将最小sdk更改为16后,我遇到了错误
错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v4 / graphics / drawable / DrawableCompatHoneycomb.class
这是我的build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.nicoleiesperida.crazyjeepney"
minSdkVersion 16
targetSdkVersion 23
multiDexEnabled true
ndk {
moduleName "player_shared"
}
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Application.mk'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
productFlavors {
}
}
dependencies {
compile 'com.google.android.gms:play-services:+'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/support-v4-19.0.1.jar')
compile 'com.facebook.android:facebook-android-sdk:4.+'
}
答案 0 :(得分:0)
同一个类由两个不同的依赖项提供。跑
gradle app:dependencies
或
./gradlew app:dependencies
其中app是应用项目名称。然后找到support v4包并将其从依赖项中排除。可能是facebook。