我试图在Android上运行一个非常简单的React Native应用程序,但构建仍然失败。构建没有给出任何错误,run-ios
工作正常。
$ react-native run-android
JS server already running.
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
我在OSX上运行并尝试在adb devices
列表上的三星Galaxy S6上部署应用程序。还尝试将ANDROID_HOME变量设置为我的.bash_profile并更新构建工具,但这些并没有帮助。
如果有人可以帮我解决这个问题,我会很高兴。
答案 0 :(得分:0)
将gradle版本更改为1.2.3。
File android/build.gradle
modify this line: classpath 'com.android.tools.build:gradle:1.2.3'