search

Home  >  Q&A  >  body text

javascript - Weex Android debugging issues

As shown in the picture, Chrome is used. In debugger mode, this message always appears in red. Sometimes it takes a long time for the front end to load. Is there any optimization plan?

给我你的怀抱给我你的怀抱2743 days ago669

reply all(3)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:33:38

    Do you use the playground app?

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 13:33:38

    After listening to the IWXDebugProxy.ACTION_DEBUG_INSTANCE_REFRESH broadcast, you need to clear and create a new WXSDKInstance and re-render it again.
    Reference:

    mWXSDKInstance.registerRenderListener(null);
    mWXSDKInstance.destroy();
    mWXSDKInstance = null;
    mWXSDKInstance = new WXSDKInstance(mActivity);
    mWXSDKInstance.registerRenderListener(this);
    mWXSDKInstance.render(...)

    This method is effective for debugging the front end in run mode. If it is actually in debug mode, this problem will still occur and needs to be solved.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 13:33:38

    I have encountered it. It was caused by the incorrect version of okhttp referenced by the app.
    I was using version 2.5, and it would time out and disconnect in 10 seconds. Just change it to 2.3.

    reply
    0
  • Cancelreply