Max
Max

Reputation: 441

Android Studio Not Installing APK After Update to 3.6.x

I just updated Android Studio from 3.5.x to 3.6.x. After the update I had to delete the .idea/* and .iml files in order for the build to work due to AS complaining about mixing Gradle and Non-Gradle files.

Since then, when I press "Run app", the Gradle build completes successfully and an apk is actually generated in the build/outputs/apk folder but the APK is not automatically installed on the running emulator. I have to drag and drop the .apk myself. Furthermore, when I manually run Build->Build APKs I get the message Build APK(s): APK(s) generated successfully for 0 modules:

Both the instant run and the "don't install APK if unchanged" settings have been disabled. I am using Gradle version 4.3 and the Android Gradle Plugin version 2.3.3

Update: More recent versions than 3.6.x run fine again without any fixes on my part needed. So I guess thanks, Google/Jetbrains.

Upvotes: 0

Views: 756

Answers (1)

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75788

Upgrade tools.build:gradle version

dependencies {
         classpath 'com.android.tools.build:gradle:3.6.1'
        // classpath 'com.android.tools.build:gradle:3.6.3'

    }

Upgrade distributionUrl version. gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

Then add below in App level build.gradle section.

 android {
        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }
    }

Then Clean-Rebuild-Restart IDE.

Upvotes: 1

Related Questions