8

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

anitoledo
  • 101
  • 1
  • 3

5 Answers5

8

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

ShortFuse
  • 5,970
  • 3
  • 36
  • 36
3

Try running your app after reloading your gradle project

Right click over your project under Gradle tab

1

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'
    }
}
Nico
  • 2,570
  • 1
  • 9
  • 17
0

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![enter image description here]1

StainlessSteelRat
  • 364
  • 1
  • 2
  • 16
  • 4
    Try "Invalidate Cache and Restart" in Android studio file option and then Clean build and try again. – Ezio May 20 '19 at 05:56
0

In my case, delete Signed Bundle files you were created.

Albert Khang
  • 621
  • 6
  • 17