-2

When trying to compile my code I get:

Error: Execution failed for task ':android:transformClassesWithJarMergingForDebug'.

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

It seems the error is in the build.gradle files. Here is the root build.gradle:

// Ed's note: apparent missing line here from original post
    dependencies {
       classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
       classpath 'com.android.tools.build:gradle:2.3.2'
       classpath 'com.google.gms:google-services:3.0.0'
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    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"
    }
}

project(":core") {
    apply plugin: "java"

    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    }
}

tasks.eclipse.doLast {
    delete ".project"
}

and the android build.gradle contains:

dependencies {
    compile project(':baseGameUtils')
    //compile files('libs/libGoogleAnalyticsServices.jar')
    compile files('libs/appbrain-applift-sdk-10.51.jar')
    compile 'com.google.android.gms:play-services-ads:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
Andreas
  • 1
  • 2
  • You had used the "entry" tag in your [original post](https://stackoverflow.com/revisions/44913946/2), which is [being deprecated](https://meta.stackoverflow.com/questions/349778/), so I thought I'd look at questions using it. I noticed a couple things in your question...a missing line at the top of your root build.gradle, and also some sketchy [L-sep](https://stackoverflow.com/questions/41555397/) characters in your android build.gradle. I mention removing them in the off chance that it has something to do with your problem, e.g. junk invisible characters in your file, or a missing line. – HostileFork says dont trust SE Sep 01 '17 at 00:21
  • I'll add that if you're wondering why the question would be downvoted, it would be because you say *"It seems the error is in the build.gradle files"* and then you give them. You don't offer any reasoning of why you believe this (note the term `zzjm` does not appear anywhere in what you've presented), and you didn't provide a [Minimal, Complete, Verifiable Example](https://stackoverflow.com/help/mcve) which someone can independently test and reproduce the error for themselves. This isn't to say your guess is wrong, but it's not a guessing game...study minimal examples that cause the problem. – HostileFork says dont trust SE Sep 01 '17 at 00:35

1 Answers1

0

This seems to be a problem with google-services:3.0.0 When you use com.google.gms:google-services:3.1.0 the problem should be solved.

I happen to work for AppBrain and I noticed that your gradle configuration for the AppBrain SDK uses a quite outdated version (10.51, whereas the current version is 13.22). If you add the gradle dependency as specified in our documentation at https://www.appbrain.com/info/help/sdk/gettingstarted.html you will always use the latest version.