Could not determine java version from '12.0.1'.

spinal

New Member
Joined
Jul 2, 2019
Hi guys, new here :)

Anyhow, I was following the guide on how to setup the android target, but get the following error when building...

Code:
"C:/Cerberus/bin/transcc_winnt" -target=Android_Game -config=Debug "C:/Cerberus/examples/mojo/mikehart/BitmapFont/BitmapFont.cxs"
TRANS cerberus compiler V2019-02-21
Parsing...
Semanting...
Translating...
Building...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '12.0.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
TRANS FAILED: Android build failed.
Done.
From what I can tell, I think I followed the instructions correctly, with the following changes to config.winnt.txt -
Code:
'--------------------
'Java dev kit path
'
'Must be set to a valid dir for ANDROID and FLASH target support
'
'The Java JDK is currently available here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
'
JDK_PATH="C:\Program Files\Java\jdk-12.0.1"
'--------------------

'--------------------
'Android SDK and tool paths.
'
'Must be set to a valid dir for ANDROID target support
'
ANDROID_PATH="C:\Program Files\Android\Android Studio"
'--------------------
reflecting where I installed android studio and java sdk.
I made sure to download API24 inside android studio as that is the version used in the guide.

Any idea if I messed something?
Thanks.
 

spinal

New Member
Joined
Jul 2, 2019
The Android SDK is in a different location to Android Studio. So the Android path is wrong.
Although that is probably correct (I changed it to match the path given inside android studio for the sdk path), the error seems to come from
Code:
JDK_PATH="C:\Program Files\Java\jdk-12.0.1"
 

dawlane

Active Member
CX Code Contributor
Joined
Jun 21, 2017
Although that is probably correct (I changed it to match the path given inside android studio for the sdk path), the error seems to come from
Code:
JDK_PATH="C:\Program Files\Java\jdk-12.0.1"
It's doesn't have anything to do with the JDK. This is a gradle (the Android build tool) installation issue. Most commonly this.
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
The one that I am using at the moment is:

Code:
JDK_PATH="D:\Program Files (x86)\Java\jdk1.8.0_181"
 

spinal

New Member
Joined
Jul 2, 2019
The one that I am using at the moment is:

Code:
JDK_PATH="D:\Program Files (x86)\Java\jdk1.8.0_181"
Thanks guys.
Using the older version seems to have done the trick! Now to dig out some old monkey code and build something!
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Cood for you. I tried the new version too and managed that it does not work for me anymore.
 
Top Bottom