You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/05/15 11:35:22 UTC

[GitHub] [incubator-weex] voids commented on issue #3190: [Android] onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 weex version is 0.28.0

voids commented on issue #3190:
URL: https://github.com/apache/incubator-weex/issues/3190#issuecomment-629185913


   same bug.
   My project has a SplashActivity render first screen, it doesn't has weex instance, and it will redirect to MainActivity which has weex instance after several seconds, and it triggers onRenderError very frequently on android 7, maybe the low performance phone leaded.
   I wrote the code below in onRenderError:
   ```java
           Log.i(Tag, "WXSDKEngine.isInitialized: " + WXSDKEngine.isInitialized());
           Log.i(Tag, "WXSDKEngine.isSoInitialized: " + WXSDKEngine.isSoInitialized());
   ```
   while reproduce, isInitialized always false.
   so, I wrote the code below in SplashActivity, before redirect:
   ```java
               while (true) {
                   try {
                       Thread.sleep(100);
                       if (WXSDKEngine.isInitialized()) {
                           break;
                       }
                   } catch (InterruptedException e) {
                       e.printStackTrace();
                   }
               }
   ```
   It works! 
   But sometimes  it will take about 30+ seconds until MainActivity shows.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org