我同時在Android Studio中誤差GCM而產生簽署的APK安卓
Error:Execution failed for task ':AppName:transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzv$zza$zza.class
搖籃產生簽訂的apk錯誤....
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "myApp"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dexOptions {
javaMaxHeapSize "2g"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile 'org.altbeacon:android-beacon-library:2.1.4'
compile project(':qRCodeReaderViewlib')
compile project(':viewpagerindicator')
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/android-query-full.0.26.7.jar')
//compile files('libs/gcm.jar')
compile files('libs/mint-4.4.0.jar')
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-messaging:9.4.0'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
任何幫助嗎?在此先感謝..
排除衝突的DEPS加入這一行dependency..compile文件樹(導演:「庫」,包括:[「的* .jar」])..並添加JAR文件依賴..並同步項目 –
這可能是因爲你正在使用不同的verion的播放服務,看看這個http://stackoverflow.com/a/38201741/3111083 –