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

Android Studio fails

Open segura2010 opened this issue 10 years ago • 8 comments

I added the dependencie to gradle, but when i try to compile the app, it gives me the following error:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

I read i should enable 'multiDexEnabled' in gradle file, so i did, and now I get the following error:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/squareup/moshi/AdapterMethodsFactory$1.class

Anyone knows how to fix it??

segura2010 avatar Jul 30 '16 08:07 segura2010

Try adding in gradle in android: dexOptions { incremental true javaMaxHeapSize "4g" } Btw. Did you execute ./gradlew clean in your project folder ?

mzmyslow avatar Jul 30 '16 11:07 mzmyslow

I recommend to check the link: http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library

mzmyslow avatar Jul 31 '16 16:07 mzmyslow

having the same issue but with:

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

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: svarzee/gps/gpsoauth/AuthToken.class

David6390 avatar Aug 01 '16 06:08 David6390

Just download the newest version of API.

mzmyslow avatar Aug 01 '16 06:08 mzmyslow

@David6390 I also use development. I had the same issue, but they fixed on Friday.

mzmyslow avatar Aug 01 '16 06:08 mzmyslow

I have to be doing something wrong...

I did what it says in #362 also using latest development and get the duplicate entry error with "svarzee/gps/gpsoauth/AuthToken.class"

David6390 avatar Aug 01 '16 07:08 David6390

I have tried and still have the error, now with "svarzee/gps/gpsoauth/AuthToken.class", like @David6390 .

At the moment I am using an old version (0.2) and it works fine, so while it works I wont try to update to the latest version.

I dont know where the problem was introduced :(

segura2010 avatar Aug 01 '16 17:08 segura2010

try

allprojects {
    repositories {
        jcenter()
    }
  }

  dependencies {
    compile 'com.pokegoapi:PokeGOAPI-library:0.3.4'
  }

FabianTerhorst avatar Aug 06 '16 11:08 FabianTerhorst