PokeGOAPI-Java icon indicating copy to clipboard operation
PokeGOAPI-Java copied to clipboard

Gradle error when run application using the last version of this API

Open meher19 opened this issue 10 years ago • 2 comments

When using the PokeGOAPI 0.3.4 as dependency i have this error : Error:Gradle: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/pokegoapi/api/gym/Battle.class

This is my gradle file :

`apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "xxx"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.google.android.gms:play-services-ads:8.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.pokegoapi:PokeGOAPI-library:0.3.4'
}

allprojects {
    repositories {
        jcenter()
    }
}

` Any ideas how to resolve this issue ? Thanks.

meher19 avatar Aug 08 '16 11:08 meher19

your jar folder is empty?

FabianTerhorst avatar Aug 08 '16 11:08 FabianTerhorst

no, there is an old jar file in the libs folder, you resolved my issue, thanks !

meher19 avatar Aug 08 '16 11:08 meher19