gpt4 book ai didi

java - 无法在 Android Studio 中生成签名的 apk,出现错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:36:46 26 4
gpt4 key购买 nike

我正在 android studio 中生成签名的 apk,但出现以下错误:

Error:Execution failed for task ':msapp_V_520:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ColorRes.class

这是我的build.gradle

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}


android {
signingConfigs {
release {
}
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}

compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.mouthshut"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}
}
}

dependencies {

compile project(':comnostra13exampleuniversalimageloaderHomeActivity')
compile project(':nineoldandroid')
compile project(':libraryActionbar')
compile project(':pullToRefresh')
compile project(':facebook')
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:multidex:1.0.+'
compile files('libs/AF-Android-SDK-v2.3.1.19.jar')
compile files('libs/classes.jar')
compile files('libs/CleverTapAndroidSDK-v1-20150903.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
//compile 'com.github.adrian110288:LoadIndicators:83ce610325'
compile project(':LoadIndicatorLibrary')
compile 'com.nispok:snackbar:2.11.+'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:23.3.0'
}

最佳答案

添加 facebook 依赖项时排除 support-v4 模块。

compile (project(':facebook')) {
exclude module: 'support-v4'
}

关于java - 无法在 Android Studio 中生成签名的 apk,出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37248461/

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