[英]AndroidStudio, java.util.zip.ZipException
I have two test phones, one is Samsung Galaxy S5, and the other one is LG G2. 我有两部测试手机,一部是三星Galaxy S5,另一部是LG G2。
Whenever I try to run my app on LG G2, I have following error. 每当我尝试在LG G2上运行我的应用程序时,都会出现以下错误。
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/google/android/gms/gcm/PendingCallback.class
The app perfectly works on S5, but G2 has an error. 该应用程序可以在S5上完美运行,但G2出现错误。 OS Version of S5 is 6.0.1, and G2 is 4.4.
S5的OS版本是6.0.1,而G2是4.4。
What should I do for this? 我该怎么办? I attached build.gradle here.
我在这里附加了build.gradle。
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "xxxx"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/ajt-2.9.jar', 'libs/javaml-0.1.7.jar')
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:11.0.1'
compile 'com.firebase:firebase-jobdispatcher:0.6.0'
compile 'org.jsoup:jsoup:1.7.3'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Have you tried what's suggested here: 您是否尝试过这里的建议:
https://github.com/firebase/firebase-jobdispatcher-android/issues/3 https://github.com/firebase/firebase-jobdispatcher-android/issues/3
compile ("com.firebase:firebase-jobdispatcher:0.6.0") {
exclude module: "play-services-gcm"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.