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...
warn No apps connected. Sending "devMenu" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
info Opening developer menu...
因为你没有连接到开发服务器所以npx react-native run-android能跑但是
yarn start操作后 "r" "d" 提示,确保您的应用程序正在模拟器或通过USB连接的手机上运行。
查看的连接adb设备 获取设备名
bash
$ adb devices
List of devices attached
adb-RF8M90J9D9M-IFr04K._adb-tls-connect._tcp device
上述设备名(adb-RF8M90J9D9M-IFr04K._adb-tls-connect._tcp)
2.
使用adb反向
bash
$ adb -s adb-RF8M90J9D9M-IFr04K._adb-tls-connect._tcp reverse tcp:8081 tcp:8081
8081