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?
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.
天蓬老师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.