Could not connect to development server


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    重啟項目  不報錯了

   


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM