I updated my Android Studio to Android Studio 3.4 and I'm trying to run one of my apps but it gives me an error.
com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug
Session 'app': Install failed. Installation failed Rerun
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.
If you need a rollback of Android Studio, check out the app's version history on Uptodown. It includes all the file versions available to download off Uptodown for that app. Download rollbacks of Android Studio for Windows.
Solved it by going to Run => Edit Configuration => app (or your project name)
In the Before Launch
section, I added Gradle-aware Make
.
The hint came from comparing my project with the example screenshot available at https://developer.android.com/studio/run/rundebugconfig#opening
Try running your app after reloading your gradle project
Right click over your project under Gradle tab
You may be using an incompatible Gradle and Android Gradle plugin version.
Upgrade Gradle to version 4.1 at least
in gradle/wrapper/gradle-wrapper.properties
use:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
and in root build.gradle
modify the following lines (add Google maven repository and update plugin to 3.0.1):
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With