嘗試運行項目時出現錯誤錯誤:任務':app:transformClassesWithJarMergingForDebug'的執行失敗。
錯誤:執行任務':app:transformClassesWithJarMergingForDebug'失敗。
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzc.class
的build.gradle文件:
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
packagingOptions
{
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
preDexLibraries = false
incremental true
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':bottom-bar')
compile project(':cropper')
}androidTestCompile('com.android.support.test.espresso:espressocore:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile "junit:junit:${rootProject.ext.junitVersion}"
// Multidex
compile 'com.android.support:multidex:1.0.1'
compile "com.android.support:appcompat- v7:${rootProject.ext.supportLibraryVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibraryVersion}"
// RecyclerView
compile "com.android.support:recyclerview-v7:${rootProject.ext.supportLibraryVersion}"
// CardView
compile "com.android.support:cardview- v7:${rootProject.ext.supportLibraryVersion}"
compile 'com.google.android.gms:play-services:9.0.0'
// Firebase
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
// Butterknife
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
// Design Compatibility for all resolution
compile 'com.intuit.sdp:sdp-android:1.0.3'
// Retrofit API cals
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.0'
// Picaso Image loading
compile 'com.squareup.picasso:picasso:2.5.0'
// Realm db inplace of SQlite
compile 'io.realm:realm-android:0.82.1'}
讓我知道,如果它是需要一些其他的信息。 謝謝。
更新此編譯「com.google.android.gms:發揮服務:11.0.2」 –
我曾嘗試這一點,但它降落在另一個錯誤 –
檢查我答... –