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

Android Studio problem

Open mzmyslow opened this issue 10 years ago • 2 comments

Description:

I've added PokeGOAPI-Java-0.0.1-SNAPSHOT.jar to my Android Studio project. When I try to run the app, I get five errors. I compared my build.gradle with PokeScanner, which also uses the API and it's mostly the same. I tried a lot of things, which I found on StackOverflow, but none of them worked.

Steps to reproduce:

  1. Get the PokeGOAPI-Java-0.0.1-SNAPSHOT.jar file building from source
  2. Put PokeGOAPI-Java-0.0.1-SNAPSHOT.jar in libs folder in Android Studio Project
  3. Right click and choose "Add as a library"
  4. ./gradlew clean in the folder with the project
  5. Write some code using API functions
  6. Run the app

Expected behavior: The app should run

Actual behavior: The app doesn't run because of 5 errors

Stacktrace (If it's a crash): Error:PARSE ERROR: Error:unsupported class file version 52.0 Error:...while parsing svarzee/gps/gpsoauth/AuthToken.class Error:1 error; aborting :app:transformClassesWithDexForDebug FAILED Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

Version: I downloaded the libs on 29.07.2016.

mzmyslow avatar Jul 29 '16 18:07 mzmyslow

Huh, seems to be an issue with gpsoauth. Can you try compiling with Java 7 instead of Java 8?

Aphoh avatar Jul 29 '16 18:07 Aphoh

Nevermind, this will be fixed with the merge of #347

Aphoh avatar Jul 29 '16 19:07 Aphoh