我在我的 App.js 中发现了这个问题,它具有以下渲染方法:-
render() {
if (this.state.isDownloading) {
return (
<View>
<Spinner
visible={this.state.isDownloading}
textContent={this.state.loadingText}
overlayColor={Colors.COLOR_MODAL_BACKDROP}
animation={UIConst.ANIMATION_TYPE.NONE}
textStyle={styles.spinnerTextStyle}
/>
</View>
);
}
return (
<Provider store={Store}>
<Router />
</Provider>
);
}
我只在 Android 发布的 apk 上发现了这个问题,它适用于 iOS。基本上我用过 CodePush。因此,一旦代码推送下载并安装更新,就会显示。- isDownloading:持有布尔值以检查应用程序是否正在更新的状态。- :将在代码推送更新应用程序时显示。- : react-redux - : react-native-router-flux 代码推送安装完成并重新启动应用程序后发生崩溃。
Libraries used are :-
1. "react-native-code-push": "^5.2.0-beta",
2. "react-native-loading-spinner-overlay": "^0.5.2",
3. "react-native-router-flux": "^4.0.0-beta.24",
4. "react-redux": "^5.0.5"
崩溃报告:-
Fatal Exception: com.facebook.react.uimanager.IllegalViewOperationException: Trying to remove a view index above child count 0 view tag: 1
detail: View tag:-1
children(0): [
],
indicesToRemove(1): [
0,
],
tagsToDelete(1): [
113,
]
at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:346)
at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:177)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:776)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:855)
at com.facebook.react.uimanager.UIViewOperationQueue.access$1600(UIViewOperationQueue.java:46)
at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded(UIViewOperationQueue.java:813)
at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:21)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)