How to Update Compiler? *solved

Monkey Targets Forums/Android/How to Update Compiler? *solved

Simonsuuri(Posted April) [#1]
hello,

(main issue)
Im making android game, and few months ago when I updated monkey-x to 87b I noticed that when building game to android it notified with warning..

[javac] warning: C:\SDKS\Android\android-sdk\platforms\android-24\android.jar(pla/plaa/blaa/blaa/blaa..): major version 52 is newer than 51, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.

It warns about 100 times with same warning when building.

I have TRANS monkey compiler V1.87

So can I upgrade the compiler or anything?

(second issue) -kind of solved
Today I upgraded Andoid SDK Build tools from 19.something to 25.2.5
and after that there is error with Pre-Dexing Jar files;
Game_MAIN.buildv87a\android_G\libs\flurry-analytics-6.5.0.jar -> flurry-analytics-6.5.0-2a2107bccc3ec7002e0972725a5264af.jar
[dx] java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
*(i noticed that same 52 version thing is within that upgrade compiler warning also)

I fixed this one now by downgrading Android SDK build tools back to 19 (and then upgraded Android SDK build tools until it stopped working, Latest build tools version that works is 23.0.3)


dawlane(Posted April) [#2]
To build for Android you need three things installed:
1 The latest version of Oracles JDK and the Java SE runtime, currently at version 8u131.
2 The latest Android SDK. Note that MonkeyX doesn't use the latest version, so that has to be selected in the SDK manager
3 Apache ANT

When you start seeing
major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
It usually means that there is more than one version of Java installed. More than likely the Java run-time was updated, but JDK hasn't. So you need to download the latest JDK, remove the old version and install the new version. You will also need to update the JDK file path in winnt.conf.txt config file to the new JDK's location.


Simonsuuri(Posted April) [#3]
Thanks a lot!
i will check these out

edit:
i got rid of those warnings, Thank you again!


dawlane(Posted April) [#4]
Forgot to mention that you can usually avoid this by not installing a JRE and setting up a environment system variable call JAVA_HOME pointing to the JDK and using the Java run-time that comes as part of the JDK install. But you will have to manually check for updates to ensure that you system remain secure.