【React Native错误集】Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

时间:2023-03-10 08:47:20
【React Native错误集】Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

  问题1:Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

react-native run-android
react-native start --reset-cache

  

 问题2:How to resolve “EADDRINUSE: address already in use” error(8081端口被占用了)  

Error: listen EADDRINUSE: address already in use :::
at Server.setupListenHandle [as _listen2] (net.js::)
at listenInCluster (net.js::)
at Server.listen (net.js::)

 解决办法:

lsof -i TCP: | grep LISTEN

 会出现如下类似提示:

node     murari   21u  IPv6       0t0  TCP *:http-alt

 然后执行:

kill - 

  ok。到此就解决了。