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

久未见 提交于 2020-03-22 07:05:14

问题


I am trying to run a selected build variant but giving me following error in Run tab,

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

So kindly suggest the solution to it.


回答1:


For me the solution was apparently to update the Gradle plugin...




回答2:


Ensure that your have set applicationId "com.example.myapp" in your build.gradle

android {
    ...
    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    ...
}

And from app -> Edit Configurations, ensure that you have selected "Default Activity"




回答3:


I had the same issue. I tried to edit Configuration, and change Deyploy of Installation Options to Nothing. And It worked for me. Hope that it'll aslo work for you



来源:https://stackoverflow.com/questions/56440572/how-to-fix-unable-to-determine-application-id-com-android-tools-idea-run-apkpr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!