执行adb devices, 提示List of devices attached
打开本地sdk目录中的platform-tools文件夹,复制下面3个文件
打开夜神模拟器安装目录中的bin目录,把复制出来的文件复制替换到bin目录中
在复制一份platform-tools目录中的adb.exe,重命名为nox_adb.exe,把nox_adb.exe复制替换到bin目录中
进入夜神模拟器安装目录的bin目录下执行下面的命令
nox_adb connect 127.0.0.1:62001
执行adb devices, 提示List of devices attached, 127.0.0.1:62001 device
进入react native目录,执行yarn start
若出现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.
执行adb reverse tcp:8081 tcp:8081 && adb shell input text rr