请帮助我无法解决错误
错误:任务执行失败':funDriveAdMob:transformClassesWithJarMergingForDebug'。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v4 / hardware / display / DisplayManagerCompat.class
我的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 16
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.nbuzovsky.wallify"
minSdkVersion 9
targetSdkVersion 21
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':sweetAlert')
compile project(':actionbarsherlock')
compile project(':androidsaripaarmaster')
compile project(':cropper')
compile project(':googleplayservices_lib')
compile project(':library')
compile files('libs/android-support-v4.jar')
compile 'com.android.support:multidex:1.0.1'
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/universal-image-loader-1.9.1.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
答案 0 :(得分:0)
如错误所示,您有2个库试图使用相同的类名(DisplayManagerCompat)。
AFAIK,Android支持V4定义了这个类,但你需要搜索并检查哪一个是复制的罪魁祸首。
我建议您首先尝试将所有库更新到最新版本。
答案 1 :(得分:0)
从build.gradle中移除此行:compile files('libs/android-support-v4.jar')