6
我創建了一個Android應用&運行上述API級別21 但低於API級別21執行失敗的任務「:應用程序:transformClassesWithJarMergingForDebug
這裏沒有運行是錯誤日誌:
錯誤:執行失敗的任務':app:transformClassesWithJarMergingForDebug'。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複的條目:安卓/支持/ V4/accessibilityservice/AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl.class 幫助我通過
下面是我的代碼的gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "*******"
minSdkVersion 16
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
packagingOptions {
exclude 'META-INF/NOTICE.txt' // will not include NOTICE file
exclude 'META-INF/LICENSE.txt' // will not include LICENSE file
}
}
dependencies {
compile fileTree(exclude: 'android-support-*.jar', dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile project(':simple-crop-image-lib')
// compile 'com.github.navasmdc:MaterialDesign:+'
compile project(':material-login')
compile 'com.android.support:multidex:1.0.1'
compile ('com.android.support:appcompat-v7:23.4.0'){
exclude module: 'support-v4'
}
}
同樣的錯誤@Er。阿瓊賽尼 –
可以展示您的應用的build.gradle –
你應該也multiDexEnabled真正 –