我已经安装了react本机,并且已经能够使用android部署我的应用程序。但是,当我试图使用react-native run-android进行部署时,它会给出以下错误:
Starting JS server...
Running /home/leo/Android/Sdk/platform-tools/adb reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html我已经使用Android成功地安装了android-sdk-tools v25.1.7、android-sdk-platform-tools v24.0.2和android-sdk-build-tools v23.0.1。
我可以使用Genymotion部署一个模拟器,我可以使用adb devices查看它,它提供了以下输出:
List of devices attached
192.168.56.101:5555 device在我的android模拟器中使用react-native run-android部署时,我还需要做什么?
发布于 2017-01-11 06:50:45
run chmod 755 android/gradlew在您的应用程序根文件夹。react-native run-android,它将再次工作。发布于 2017-01-11 09:58:54
问题可能是,genymotion中的设备的api比android构建工具api 23要低,因为在安装本机之前已经添加了它。尝试:
https://stackoverflow.com/questions/39237338
复制相似问题