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 2019/09/06 05:34:13 UTC

[GitHub] [incubator-weex] hotstu opened a new issue #2884: require callbacks when WXSDKEngine.initialize complete

hotstu opened a new issue #2884: require callbacks when WXSDKEngine.initialize complete
URL: https://github.com/apache/incubator-weex/issues/2884
 
 
   how to reduce: 
   1. init engine in the Applicaiton 
   ```
           InitConfig config = new InitConfig.Builder()
           WXSDKEngine.initialize(this, config);
   ``` 
   it seems the init method above contains async method call :
   ```
   WXBridgeManager.getInstance().post(new Runnable() {
   ...
   }
   ```
   
   so the developer do not know when dit the  `WXSDKEngine` really complete init, if you load page  too quick, you just get an error
   ```
                   mWXSDKInstance.renderByUrl(pageName, bundleUrl, null, null, WXRenderStrategy.APPEND_ASYNC);
   
   ```
   ```
   E/MainActivity: -1001 degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1
   ```
   

----------------------------------------------------------------
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


With regards,
Apache Git Services