• 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

HOW TO: Build Android target

I wouldn't worry about it. Mine did the same. But at the end it builds smoothly.
 
Have just noticed I have two Android Studio installations and suspect this may be the issue - not sure how I managed that but I'll see if resolving this works.
 
I wouldn't worry about it. Mine did the same. But at the end it builds smoothly.
Thanks Mike, I appreciate your assistance, but it didn't build - no .apk file generated. A simple restart seems to have resolved some of my problems - it installed SDK and tools v27 OK, though I'm still a bit puzzled by this as v28 is specified in config.cxs.

I'm now getting a different error:

FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not resolve com.google.code.gson:gson:2.8.4.
Required by:
project :app > com.google.android.ads.consent:consent-library:1.0.3
> Could not resolve com.google.code.gson:gson:2.8.4.
> Could not get resource 'https://jcenter.bintray.com/com/google/code/gson/gson/2.8.4/gson-2.8.4.pom'.

> Could not GET 'https://jcenter.bintray.com/com/google/code/gson/gson/2.8.4/gson-2.8.4.pom'.

> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target​

I can download gson-2.8.4.pom manually - any idea where I might put it to get this to work?
 
No, no idea. Ca you share a small example project that will show this error so I can try myself?
Which platform are you on?
 
I'm on Windows 10.

I updated the GSON ( https://github.com/google/gson/releases/tag/gson-parent-2.8.5 ) and I'm now getting a different error:

FAILURE: Build failed with an exception.
28 actionable tasks: 27 executed, 1 up-to-date
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No connected devices!​

I tried a small project - Cartoon Clouds - from http://monkeygameprogramming.blogspot.com/ (second project down) which builds for HTML5 but Android build fails giving above error as it does for my project, which used to build using Monkey.
 
Sorry, I was mistaken, it did generate an .apk when building for release, in the project's build \android\app\build\outputs\apk\release folder - is that the usual place? It just fails to build when debugging or when I build and run, presumably because I don't have an Android emulator installed. I took a break from programming due to ill-health for a few years and my memory appears to have a few patchy areas so I may be asking some dumb questions here. Apologies if so.

I do have another small problem - the apk's generates an error 'There is a problem parsing the package' when attempting to install on my Kindle Fire HD, but installs and runs OK on a Lenovo Yogabook, both my project and the cartoon clouds one. I'll have to have a think about that - maybe Android version?.
 
Thanks again Mike. My old Kindle Fire HD runs a version of Android 4.0.3 that has been fiddled with by Amazon, but it used to run compiled Monkey X projects a couple of years ago. It isn't really important as I have other more modern devices I can use for testing.
 
No matter what I've done, I can't get this build to work! I have followed all the android target instructions thoroughly.

Do I need to run cerberus or android sdk manager as administrator? i recall when using Monkey compiler I had to run sdk manager as adminstrator. (which I think I've all ready tried in this case)
As you can see below, all the licenses are accepted. Also, looking in c:\users\admin\etc... folder the sdks and api files and folders are all there - so as far as I know nothing is missing. but get the write error, like it doesn't have permission to write, or acts like the sdk/api files are missing ...
Please help!

"C:/Cerberus_v2018_08_10/bin/transcc_winnt" -target=Android_Game -config=Debug "C:/Cerberus_v2018_08_10/MyStuff/WoodRoom2/WoodRoom2.monkey"

TRANS cerberus compiler V2018-08-10
Parsing...
Semanting...
Translating...
Building...

Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Program Files\Android\Android Studio\licenses
License for package Android SDK Build-Tools 27.0.3 accepted.
Preparing "Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)".
Warning: Failed to read or create install properties file.
Checking the license for package Android SDK Platform 28 in C:\Program Files\Android\Android Studio\licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
Warning: Failed to read or create install properties file.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
platforms;android-28 Android SDK Platform 28
build-tools;27.0.3 Android SDK Build-Tools 27.0.3
The SDK directory is not writable (C:\Program Files\Android\Android Studio)

* 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 11s
TRANS FAILED: Android build failed.

Done.

Sorry to bother about this, as it seems others had this issue?
 
Sorry to bother about this, as it seems others had this issue?
That looks like you have a problem with Android Studio. Maybe try to reinstall.

Do I need to run cerberus or android sdk manager as administrator?
I always install stuff as an admin. But running, no. I installed 28 and 27 from within Android studio with the tools needed. Then copied
the licenses directory like mentioned in the first post.

Your error I never saw before.

upload_2018-9-28_22-6-21.png


upload_2018-9-28_22-6-43.png
 
Thanks for the reply!
Looking at your sdk manager, looks like I don't have a couple things installed that you do - CMake, LLDB, NDK and Google Play Licensing Library. I don't need the NDK do I? I thought it wasn't necessary with this type of gradle build? Nonetheless, I'll try installing the stuff thats missing and try again - Thanks.

** EDIT **
Ok, I installed the stuff I was missing (Cmake, LLDB and License Lib) based on your screen shot - Build finally works - whew! Thanks for your help and posting that pic!

:app:installDebug
Installing APK 'app-debug.apk' on 'SM-G950U - 8.0.0' for app:debug
Installed on 1 device.
BUILD SUCCESSFUL in 45s
28 actionable tasks: 27 executed, 1 up-to-date
Done.
 
Last edited:
So, I've started the long task of updating all 29 of my apps on Google Play - Everything is building OK but Admob doesn't seem to be working. I haven't noticed any errors, but the interstitial ads aren't showing at all and the banner is a black rectangle. I remember this happening before but have forgotten how to remedy it. Am I forgetting something somewhere?
 
So, I've started the long task of updating all 29 of my apps on Google Play - Everything is building OK but Admob doesn't seem to be working. I haven't noticed any errors, but the interstitial ads aren't showing at all and the banner is a black rectangle. I remember this happening before but have forgotten how to remedy it. Am I forgetting something somewhere?
Ouch. I will have a look.
 
Hey, I finally want to try to deploy on Android again for the first time since Monkey, but this is the console output when I try:

Cerberus:
"D:/Dev/cerberus-v2018-12-30/bin/transcc_winnt" -target=Android_Game -config=Debug "D:/Dev/Pew Pew Laser Beams/Videogame/pew_pew_laser_beams.cxs"
TRANS cerberus compiler V2018-08-10
Parsing...
Semanting...
Translating...
Building...
Starting a Gradle Daemon, 4 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Dev\Pew Pew Laser Beams\Videogame\pew_pew_laser_beams.buildv2018-12-30\android\app\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Minimum supported Gradle version is 4.10.1. Current version is 4.4. If using the gradle wrapper, try editing the distributionUrl in D:\Dev\Pew Pew Laser Beams\Videogame\pew_pew_laser_beams.buildv2018-12-30\android\gradle\wrapper\gradle-wrapper.properties to gradle-4.10.1-all.zip

* 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 4s
TRANS FAILED: Android build failed.

Any thoughts/what info would help figure this out?
 
When I compile for Android on Mac, I get this. What's wrong or missing and how to solve it?


"/Applications/Cerberus/bin/transcc_macos" -target=Android_Game -config=Release -run "/Users/layoutcenter/eigenes/yodas video arcade/brainfrog/brainfrog.monkey"

TRANS cerberus compiler V2021-03-21
Parsing...
Semanting...
Translating...
Building...
Downloading https://services.gradle.org/distributions/gradle-4.6-all.zip

Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version

at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)

at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)

at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1911)

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1027)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1262)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1289)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1273)

at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:523)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)

TRANS FAILED: Android build failed.

at org.gradle.wrapper.Download.downloadInternal(Download.java:66)

at org.gradle.wrapper.Download.download(Download.java:51)

at org.gradle.wrapper.Install$1.call(Install.java:62)

at org.gradle.wrapper.Install$1.call(Install.java:48)

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)

at org.gradle.wrapper.Install.createDist(Install.java:48)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Done.
 
No help available? I'm stuck.
More information would be needed.
The version of macOS.
The version of the JDK
The version of Android Studio and the installed API.
And how you have your setup.
 
I see so many security warnings there so I wonder if it has to do with macOS security changes they are going through, try to add to the CX configuration file:

transcc_ssl_protocols = TLSv1.2
 
Mac OS is 12.0.1
How to check version of the JDK?
How to check version of Android Studio? API?

I just did what is written in the beginning of this thread: Download and install and put the path in the file.

@Wingnut: "configuration file" is the one I put the path in? Or which one?
 
Back
Top Bottom