【发布时间】:2016-06-06 08:20:18
【问题描述】:
我已经添加了这个库,但是当我想构建项目进行调试时,它会显示如下错误
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException:java.util.zip.ZipException: duplicate entry: android/support/v4/util/DebugUtils.class
我什么都试过了
multiDexEnabled true
或
dexOptions {
javaMaxHeapSize "3g" //specify the heap size for the dex process
}
或
exclude group: 'com.android.support', module: 'support-v4'
但对我不起作用。
这是我的 build.gradle 文件依赖项
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ('com.journeyapps:zxing-android-embedded:3.2.0@aar') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile ('com.google.zxing:core:3.2.1'){
exclude group: 'com.android.support', module: 'support-v4'
}
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile ('com.ramimartin.bluetooth:AndroidBluetoothLibrary:1.0.1-SNAPSHOT') {
exclude group: 'com.android.support', module: 'support-v4'
}
}
感谢您的所有建议。
【问题讨论】:
标签: android build bluetooth dependencies android-support-library