Android React Native卡在闪屏上

笛里谁知壮士心,沙头空照征人骨。这篇文章主要讲述Android React Native卡在闪屏上相关的知识,希望能为你提供帮助。
有时,在后台很长一段时间后,我的应用程序无法加载并卡在闪屏上。
我能够通过以下方式在调试模式下重现这一点: - 启动应用程序 - 远程使用debug js - 杀死应用程序 - 启动应用程序
并在发布模式下: - 启动应用程序 - 进入参数 - 开发选项 - 启用不要保持活动 - 再次启动应用程序
如果我在调试模式下尝试使用release方法重现此错误,则会出现以下错误:

Process: com.situaction, PID: 22308 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:318) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.IllegalStateException: closed at okhttp3.internal.ws.RealWebSocket.close(RealWebSocket.java:164) at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeWebSocketQuietly(ReconnectingWebSocket.java:110) at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeQuietly(ReconnectingWebSocket.java:103) at com.facebook.react.packagerconnection.JSPackagerClient.close(JSPackagerClient.java:96) at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:158) at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:154) at android.os.AsyncTask$2.call(AsyncTask.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

它似乎与react-native-navigation和/或react-native-redux相关联,所以这里是我的依赖项:
"react": "16.0.0-alpha.6", "react-native": "0.43.3", "react-native-navigation": "1.1.398", "react-redux": "^5.0.5", "redux": "^3.7.0", "redux-logger": "^3.0.1", "redux-observable": "^0.14.1", "redux-persist": "^4.8.1", "redux-persist-transform-filter": "0.0.13",

答案好的,如果发现这是一个反应原生导航问题。 我通过降级到1.1.250版本解决了我的问题。
【Android React Native卡在闪屏上】它似乎解决了这个问题,因为我无法重现它,我的应用程序现在工作正常。

    推荐阅读