任务执行失败':android:transformClassesWithJarMergingForRelease'

时间:2016-12-16 02:59:44

标签: android gradle libgdx android-gradle build.gradle

我无法解决以下错误

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzqx.class

我知道问题在于相互冲突的版本,但我不知道如何解决它。

我的Android依赖项是:

 dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
        compile 'com.google.android.gms:play-services-ads:10.0.0'

        compile 'com.google.android.gms:play-services-games:10.0.0'
        compile project(':BaseGameUtils')



    }

我该怎么解决?

1 个答案:

答案 0 :(得分:0)

我必须仔细地结合以前相似类型的问题才能得到答案。我必须将以下行添加到build.gradle

中的配置块
 all*.exclude group: 'com.google.android.gms', module: 'play-services-plus'