Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant:’
解决方法:
确保在build.gradle文件中设置了applicationId “com.example.myapp”;
android {
…
defaultConfig {
applicationId “com.example.myapp”
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName “1.0”
}
…
}
且在 app -> Edit Configurations 选项中, 确保选中了 “Default Activity”;
原文链接
以下是我自己的解决方案:
app -> Edit Configurations -> Installation Options -> Deploy:选择Nothing;