React Native android 构建失败而无一例外



我正在尝试在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上部署该应用程序。还尝试将变量设置为我的.bash_profile ANDROID_HOME并更新构建工具,但这些都没有帮助。

如果有人能帮我解决这个问题,我会很高兴。

gradle 版本更改为 1.2.3。

File android/build.gradle
modify this line: classpath 'com.android.tools.build:gradle:1.2.3'

最新更新