Android gradle installDebug task stopped working after upgrade

The installDevDebug task stopped working after updating the gradle plugin from 2.1.3 - 2.3.3

./gradlew installDevDebug
...
Unable to install 
/Users/user/Android/MyApp/app/build/outputs/apk/App-1.34.0-dev-
debug-unaligned.apk
com.android.ddmlib.InstallException: Failed to install all
    at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:96)
    at com.android.ddmlib.Device.installPackages(Device.java:904)
    at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:136)
    at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.java:134)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)

build.gradle

...
buildscript {
    ext.gradle_plugin_version = '2.3.3'
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"

...
    productFlavors {
        prod {
        }
        dev {
            minSdkVersion 21
            multiDexEnabled true
        }
    }
}

Can someone explain what has changed in the gradle plugin and how to fix this problem? Maybe the problem is with collectors? Thank.

+4
source share
1 answer

I found that I had to specify this maven repository at the same time as I updated my Intellij to 2017.2 (which made me update the gradle plugin).

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
0
source

Source: https://habr.com/ru/post/1680483/


All Articles