錯誤:執行任務':app:transformClassesWithJarMergingForRelease'失敗。
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/widget/CursorAdapter$MyDataSetObserver.class - List item
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
dexOptions {
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "com.omairm.hoops"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
ndk {
moduleName "player_shared"
}
}
sourceSets {
main {
jni.srcDirs = []
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile ('com.google.android.gms:play-services:+'){exclude module: 'Support-v4'}
compile files('libs/PTAdRevMob.jar')
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')
}
我需要刪除CursorAdapter.class?
究竟是你想使用JAR什麼文件?你意識到你正在使用真正舊的庫,對吧? –
@ cricket_007這就是我從buildbox導出中得到的東西,我沒有絲毫的餘地,我會沿着 – Omair
的方向學習更多......我可能會建議在深入Android之前學習Java基礎知識。那麼你可以選擇學習更多關於Maven或Gradle ... –