react-native 項目重啟后 突然報錯 先是紅屏
Could not get BatchedBridge, make sure your bundle is packaged correctly
reload之后
Could not connect to development server
項目啟動之后 react-native start ,輸入 r 命令行顯示
warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
info Reloading app...
刪依賴,清緩存都試了,不行。后來看到 在輸端口號 8081;
adb shell input keyevent 82 然后在設置里 settings 里面 找到 DEbug server host & port for device ,輸入了8081;錯誤更多了
后來發現應該輸入 IP加端口號 例如 0.0.0.0:8081 重啟項目 不報錯了