2017-06-05 179 views
0

我试图在模拟器上运行Android应用程序与Android V4.1.1, 该应用程序在Android版本中运行良好> 5,但是当我尝试运行应用程序在Android V4.X终端是给我下一个错误:Android上的react-native run-android <5

Running adb -s xxx.xxx.xx.xxx:5555 reverse tcp:8081 tcp:8081 
error: closed 
Could not run adb reverse: Command failed: adb -s xxx.xxx.xx.xxx:5555 reverse tcp:8081 tcp:8081 

显示出错误的应用程序后显示:

Unfortunately, APP_NAME has stopped. 

我有最新版本的Android SDK和工具。

+0

我也对这个问题的解决方案感兴趣。正如它在这里所说的,http://facebook.github.io/react-native/releases/0.22/docs/running-on-device-android.html#using-adb-reverse,adb reverse可用于运行android 5.0+的设备。没有这个命令,我无法在调试模式下运行应用程序... – zarcode

+0

您是否尝试过配置您的开发版本以通过WiFi进行连接?根据https://facebook.github.io/react-native/docs/debugging.html#debugging-on-a-device-with-chrome-developer-tools “或者,从Developer Menu中选择”Dev Settings“ ,然后更新“调试服务器主机的设备”设置以匹配您的计算机的IP地址。“ –

回答

0

我发现在Android 4.1.1中运行的方式,在Genymotion中它不工作,但在Android Studio的模拟器中它工作。我仍然无法让它在Geny上运行。