react-native run-android build成功 启动adb失败

build代码

:app:installDebug
Installing APK 'app-debug.apk' on 'genymotion_vbox86p_4.4.4_160825_200758 - 4.4.4' for app:debug
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 19.996 secs
Running E:\Android\sdk/platform-tools/adb -s 192.168.89.101:5555 reverse tcp:8081 tcp:8081
error: closed
Could not run adb reverse: Command failed: E:\Android\sdk/platform-tools/adb -s 192.168.89.101:5555 reverse tcp:8081 tcp:8081
Starting the app on 192.168.89.101:5555 (E:\Android\sdk/platform-tools/adb -s 192.168.89.101:5555 shell am start -n com.couldnotes/.MainActivity)...
Starting: Intent { cmp=com.couldnotes/.MainActivity }
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd.exe ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104

build过后的包是以前的一个修改的包,并不是最新的
可以通过手动启动react-native start 来更新到最新更改的
求大大们解决呐~

阅读 8.1k
1 个回答

已解决

1、adb启动的问题 换成5.0版本以上的模拟器就行了
2、Error: spawn cmd.exe ENOENT 错误是因为系统环境 PATH中少配了C:\windows\system32
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏