react native com.android.ddmlib.InstallException: Unable to upload some APKs我踩过的坑

创建了react native 项目跑起来了却安装无法自己安装到手机上

:app:installDebug

Installing APK 'app-debug.apk' on 'vivo X6Plus D - 5.1'
Unable to install E:\ReactProject\MyReactProject\android\app\build\outputs\apk\app-debug.apk
com.android.ddmlib.InstallException: Unable to upload some APKs
        at com.android.ddmlib.Device.installPackages(Device.java:920)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:113)
        at com.android.builder.testing.ConnectedDevice$installPackages$0.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.groovy:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)

        at 


才刚接触配置好环境后创建第一个项目运行算是成功了却安装失败,找了很多资料总算有个结论了

The most likely cause of this problem will gradle version 1.3.1.

In my experience, upgrading gradle did not fix the problem. To fix it, I had to downgrade it to a rather memorable version of 1.2.3.

Look for com.android.tools.build:gradle:1.3.1 in the android/build.gradle, and update it tocom.android.tools.build:gradle:1.2.3.

所有我把1.3.1 改成1.2.3 运行后就Ok了,希望对遇到这样的问题的同学有帮助。

你可能感兴趣的:(手笔,踩过的坑)