• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Could not determine java version from '12.0.1'.

spinal

New member
Joined
Jul 2, 2019
Messages
5
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.
 
The Android SDK is in a different location to Android Studio. So the Android path is wrong.
 
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"
 
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.
 
The one that I am using at the moment is:

Code:
JDK_PATH="D:\Program Files (x86)\Java\jdk1.8.0_181"
 
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!
 
Cood for you. I tried the new version too and managed that it does not work for me anymore.
 
Unfortunately, I got the same error, just with '14.0.1'.
I now installed an older version (JDK8), and then get these errors:


Code:
"C:/Users/tetra/Cerberus/bin/transcc_winnt" -target=Android_Game -config=Release "C:/Users/tetra/Cerberus/user/Test1.cxs"
TRANS cerberus compiler V2020-05-09
Parsing...
Semanting...
Translating...
Building...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.2.1.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

* 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

BUILD FAILED in 1s
TRANS FAILED: Android build failed.
Done.

Could it be a too old Gradle Version (3.2.1)? The current one is 6.4.1
Or maybe it has to do with my Android Studio being the brandnew 4.0?

Is someone so kind to help?

EDIT: The Build works for Desktop and HTML5 Targets
 
I am running an older JAVA version:

JDK_PATH="D:\Program Files (x86)\Java\jdk1.8.0_172"
Android Studio 3.6.2

Works fine here.
 
Last edited:
Newer Versions of Android Studio already ship with Java SDK included. Maybe it is best to point to this as the default for new cerberus installations. The path is ...\AndroidStudio\jre BTW don't get fooled by the name jre. The real Java Runtime Environment is located in \AndroidStudio\jre\jre :p
 
Back
Top Bottom