React-Native:解决真机调试时候Could not get BatchedBridge, make sure your bundle is packaged properly

时间:2020-12-01 12:47:16

问题一用真机通过USB连接电脑调试的时候报如下错:Could not get BatchedBridge, make sure your bundle is packaged properly,如图:

React-Native:解决真机调试时候Could not get BatchedBridge, make sure your bundle is packaged properly

 



解决方案首先找到adb.exe安装路径(我的在:D:\Android\sdk1\platform-tools), 打开cmd运行如下命令:

adb reverse tcp:8081 tcp:8081

再运行

react-native run-android