3

I just updated my Android Studio to 3.6 and when I click Run app it gives me following message in the Run Tab

Message in Run Tab :

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug

App Builds fine but I am not able to run it on my phone as it gives me above message.

here is my Build.gradle(Module:app) as below with ApplicationID

Build.gradle(module:app)


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.android.MyApp"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
}
jdk
  • 451
  • 1
  • 6
  • 18
  • Does this answer your question? [How to fix 'Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant:'](https://stackoverflow.com/questions/56440572/how-to-fix-unable-to-determine-application-id-com-android-tools-idea-run-apkpr) – snek_case Mar 02 '20 at 16:39
  • no this didn't helped me – jdk Mar 02 '20 at 16:48
  • 1
    facing exactly same problem. everything was fine on the previous version. updated to 3.6 and boom, this weird error showing up. – WS Ayan Mar 05 '20 at 05:25

2 Answers2

1

Update your Gradle plugin and wrapper versions to minimum 3.0.1/4.1

in file build.gradle for a project:

classpath 'com.android.tools.build:gradle:3.0.1'

in file gradle-wrapper.properties:

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

I have the same issue with a Cordova Project after I updated Android Studio to 3.6.1

As a workaround I use installDebug Gradle Task from Gradle Tab View -> Tasks -> Install

enter image description here

I also have issues with Build -> Build Apks so I use assembleRelease Gradle Task from Tasks -> build

Liviu
  • 768
  • 8
  • 9