无法确定应用程序id:com.android.tools.idea.run.ApkProvisionException
当我在升级Android Studio后尝试运行我的Android应用程序时,我遇到了这个错误 '无法确定应用程序id:com.android.tools.idea.run.ApkProvisionException:变量:调试的主工件没有输出' 我尝试在运行/调试配置中将部署更改为“Nothing”,然后发现某个类不存在的错误 这是我的build.gradle文件,请看一下,告诉我你的看法无法确定应用程序id:com.android.tools.idea.run.ApkProvisionException,android,Android,当我在升级Android Studio后尝试运行我的Android应用程序时,我遇到了这个错误 '无法确定应用程序id:com.android.tools.idea.run.ApkProvisionException:变量:调试的主工件没有输出' 我尝试在运行/调试配置中将部署更改为“Nothing”,然后发现某个类不存在的错误 这是我的build.gradle文件,请看一下,告诉我你的看法 apply plugin: 'com.android.application' apply plugin
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = '4.0.0'
dependencies {
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName android.defaultConfig.applicationId
}
}
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "bg.isic.myisicapp"
minSdkVersion 14
targetSdkVersion 23
versionCode 25
versionName "1.4.5"
}
buildTypes {
release {
minifyEnabled true
proguardFile 'proguard-android-annotations.pro'
proguardFile 'proguard-android-gif-drawable.pro'
proguardFile 'proguard-eventbus.pro'
proguardFile 'proguard-gson.pro'
proguardFile 'proguard-guava.pro'
proguardFile 'proguard-retrofit.pro'
proguardFile 'proguard-rules.pro'
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
}
dependencies {
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.3'
compile 'uk.co.chrisjenx:calligraphy:2.0.2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.commonsware.cwac:layouts:0.4.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.google.zxing:core:3.2.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'rongi.rotate-layout:rotate-layout:2.0.0'
compile 'com.android.support:design:23.4.0'
compile('com.theartofdev.edmodo:android-image-cropper:2.3.1') {
exclude module: 'support-v4';
exclude module: 'appcompat-v7'
}
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'org.parceler:parceler-api:1.1.9'
apt 'org.parceler:parceler:1.1.9'
}
apply plugin: 'com.google.gms.google-services'
dependencies {
compile 'com.google.firebase:firebase-core:9.0.0'
}
有人需要帮助吗?确保您使用的Android Studio版本具有正确的Android Gradle插件版本 我在更新Android Studio后遇到了这个问题。我不知道这是否是你的问题,但如果其他人看到了,我发现这里发生了什么
为了解决这个问题,我只需强制执行gradle同步,此时Android studio看到当前Android studio版本有一个旧的Android gradle插件版本,并提示我进行更新。确保您使用的Android studio版本有正确的Android gradle插件版本 我在更新Android Studio后遇到了这个问题。我不知道这是否是你的问题,但如果其他人看到了,我发现这里发生了什么
要解决这个问题,我只需强制执行gradle同步,此时Android studio看到我的当前Android studio版本有一个旧的Android gradle插件版本,并提示我更新。我在将Android studio更新到4.1.1时发现了这个错误
然后我将我的gradle版本从6.7.0更新到6.7.1,通过这种方式解决了这个问题。我在将android studio更新到4.1.1时发现了这个错误 然后我将我的渐变版本从6.7.0更新到6.7.1,通过这种方式解决了这个问题