react-native CodePush

react-native   Adnroid 每一次打包发布的时候  一运行就报如下错误

这个问题闹腾了我整整一个星期啊!!!!

最后我的问题居然是没有配置react-native CodePush_第1张图片手一抖,忽略连这一步,导致有些资源文件没有打包进来!!!



发布时候出现一下问题  后有可能是这个文档没有看好!!!这个坑希望对后来的人有些帮助!!


FATAL EXCEPTION: main

                                                                   Process: com.houkew.zanzan, PID: 27236
                                                                   java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Could not connect to development server.
                                                                   Try the following to fix the issue:
                                                                   Ensure that the packager server is running
                                                                   Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
                                                                   If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
                                                                   If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to y
                                                                       at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:911)
                                                                       at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:100)
                                                                       at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:197)
                                                                       at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:180)
                                                                       at android.os.AsyncTask$2.call(AsyncTask.java:295)
                                                                       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                       at java.lang.Thread.run(Thread.java:818)
                                                                    Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Could not connect to development server.
                                                                   Try the following to fix the issue:
                                                                   Ensure that the packager server is running
                                                                   Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
                                                                   If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
                                                                   If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to y
                                                                       at com.facebook.react.common.futures.SimpleSettableFuture.get(SimpleSettableFuture.java:68)
                                                                       at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:882)
                                                                           ... 9 more
                                                                    Caused by: java.lang.RuntimeException: Could not connect to development server.
                                                                   Try the following to fix the issue:
                                                                   Ensure that the packager server is running
                                                                   Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
                                                                   If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
                                                                   If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to y
                                                                       at com.facebook.react.bridge.ReactBridge.loadScriptFromAssets(Native Method)
                                                                       at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:32)
                                                                       at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:149)
                                                                       at com.facebook.react.ReactInstanceManagerImpl$4.call(ReactInstanceManagerImpl.java:902)
                                                                       at com.facebook.react.ReactInstanceManagerImpl$4.call(ReactInstanceManagerImpl.java:883)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:73)
                                                                       at android.os.Handler.handleCallback(Handler.java:739)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
                                                                       at android.os.Looper.loop(Looper.java:148)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:193)
                                                                           ... 1 more

你可能感兴趣的:(ReactNative)