Warning, Warning, new Android SDK rev is out

I just updated my Android SDK and got a new update of r21.
Afterwards, I could not build my Android project in the jME Platform anymore.

I kept getting the following error:
java.lang.NoSuchMethodError: java.util.Arrays.copyOfRange([BII)[B at com.android.dx.io.DexBuffer$Section.readByteArray(DexBuffer.java:350) at com.android.dx.dex.TableOfContents.readHeader(TableOfContents.java:77) at com.android.dx.dex.TableOfContents.readFrom(TableOfContents.java:71) at com.android.dx.io.DexBuffer.(DexBuffer.java:135) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:298) at com.android.dx.command.dexer.Main.run(Main.java:232) at com.android.dx.command.dexer.Main.main(Main.java:174) at com.android.dx.command.Main.main(Main.java:91) [/java]

Finally, I found that my JAVA_HOME was set to too early of a version (java.util.Arrays.copyOfRange was added in java 1.6. )

Iā€™m on Windows7 and found that the JAVA_HOME was set to ā€œC:\Program Files\Java\jre1.5.0_06ā€

After changing this to ā€œC:\Program Files\Java\jre6ā€ I was able to build and run on Android again.

1 Like

Cool, thanks for the info. So Java 1.6 is now baseline for Android.