问题描述
- android: 请前辈帮解决duplicate entry该怎么解决
-
项目在studio中,添加TuSDK三方库之后出现了
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/internal/view/SupportMenu.class
gradle里面的内容为
apply plugin: 'com.android.application'android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.kingdowin.xiugr"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
javaMaxHeapSize "2g"
incremental true
jumboMode true
preDexLibraries = false
}
configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
productFlavors {
}
}dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-fitness:6.5.87'
compile 'com.google.android.gms:play-services-wearable:6.5.87'
compile project(':TuSDK')
}
解决方案
http://www.debugease.com/android/217245.html