gpt4 book ai didi

android - 任务 ':app:shrinkReleaseMultiDexComponents' 执行失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:53:46 25 4
gpt4 key购买 nike

在 Android Studio 中生成签名的 apk 时出现以下错误。

:app:shrinkReleaseMultiDexComponents FAILED
Error:Execution failed for task ':app:shrinkReleaseMultiDexComponents'.
> java.io.IOException: The output jar [E:\SVN_studio\100's\trunk\app\build\intermediates\multi-dex\release\componentClasses.jar] must be specified after an input jar, or it will be empty.
Information:BUILD FAILED
Information:1 error
Information:Total time: 35.975 secs
Information:159 warnings

这是我的build.gradle文件

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 21
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "<packageName>"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true


}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
lintOptions {
abortOnError true;
}

}

repositories {
mavenCentral()
}
repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:design:22.2.1'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.android.support:cardview-v7:21.0.+'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.android.support:support-v13:22.2.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.mikhaellopez:circularimageview:2.0.1'
compile(name: 'app-debug', ext: 'aar')
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}

不知道为什么会出现这些错误?谁能帮帮我?

最佳答案

尝试在 minifyEnable 和同步项目上设置为 false

 buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }

关于android - 任务 ':app:shrinkReleaseMultiDexComponents' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34086288/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com