Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade to AndroidStudio 3.4 and now can´t run my app

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

like image 695
anitoledo Avatar asked May 13 '19 16:05

anitoledo


People also ask

Why is Android Studio not working?

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.

How do I download the different version of Android Studio?

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.


3 Answers

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

like image 79
ShortFuse Avatar answered Oct 24 '22 07:10

ShortFuse


Try running your app after reloading your gradle project

Right click over your project under Gradle tab

like image 2
Manasa Murali Avatar answered Oct 24 '22 08:10

Manasa Murali


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'
    }
}
like image 1
Nico Avatar answered Oct 24 '22 07:10

Nico