react-native run-android错误:无法上传一些APK

时间:2016-08-25 02:39:00

标签: android gradle react-native apk

当我尝试在手机上上传react-native apk时,出现错误:

:app
:installDebug                                                                  

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Unable to upload some APKs

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

2 个答案:

答案 0 :(得分:1)

首先,检查您的设备是否已插入:

adb devices

然后检查gradle版本。版本 1.3.1 well known导致此问题。要解决此问题,请转到 android / build.gradle 并将版本更改为 1.2.3

答案 1 :(得分:0)

我遇到此错误,因为我使用的是Node v5.0。 切换到Node v6.6为我解决了这个问题。