Reputation: 101
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
Upvotes: 8
Views: 9773
Reputation: 123
Try running your app after reloading your gradle project
Right click over your project under Gradle tab
Upvotes: 3
Reputation: 2862
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'
}
}
Upvotes: 1
Reputation: 6804
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
Upvotes: 8
Reputation: 550
I had the same problem.
On the left there is a pane where all the files are displayed called "Build Variants"
I selected that and my main app module was set to debug-x86. I changed that to debug-x86-64 and it worked]1
Upvotes: 0