Update app to android-30 - MonkeyX

Cristiano

New member
Joined
May 15, 2018
Messages
24
Hello. Can someone help me, please?

I'm trying to update one of my games to android-30. I've downloaded the SDK from Android Studio and so, but when I compile I got this error:

BUILD FAILED
C:\Users\CrisDriEnzo\AppData\Local\Android\Sdk\platforms\android-30\tools\ant\build.xml:538: Unable to resolve project target 'android-24'

I've copied the folder ant from the previous android sdk folder..

Sorry if this is a MonkeyX related problem.. :rolleyes:

Regards!
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
686
Well, I think your monkey version still uses Ant as the build tool and with cerberus we switched to gradle.
Did you try to migrate to cerberus with your code, or whats the reason you didn't?
 

Cristiano

New member
Joined
May 15, 2018
Messages
24
Well, I think your monkey version still uses Ant as the build tool and with cerberus we switched to gradle.
Did you try to migrate to cerberus with your code, or whats the reason you didn't?
Well, I've never planned to move to Cerberus because Monkey was enough to me.. But in this case I'll try to compile on Cerberus. Is easy to move from Monkey?
 

Cristiano

New member
Joined
May 15, 2018
Messages
24
I downloaded Cerberus and tried to run on it. Now that's what happened:


Code:
FAILURE: Build failed with an exception.



Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings



* What went wrong:

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

> Failed to install the following Android SDK packages as some licences have not been accepted.

     patcher;v4 SDK Patch Applier v4

     platform-tools Android SDK Platform-Tools

     emulator Android Emulator

     build-tools;30.0.3 Android SDK Build-Tools 30.0.3

     tools Android SDK Tools

  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.

  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

 

  Using Android SDK: C:\Users\CrisDriEnzo\AppData\Local\Android\Sdk\platforms\android-30



* 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 2m 1s

TRANS FAILED: Android build failed.

Done.
 

vitaliano.neto

New member
Joined
Apr 28, 2022
Messages
3
From the Gradle message, it seems that you need to accept the Android SDK License, to do that enter the following command on Windows cmd, then try to build again:
C:\Users\CrisDriEnzo\AppData\Local\Android\Sdk\tools\bin\sdkmanager --licenses
 

Cristiano

New member
Joined
May 15, 2018
Messages
24
From the Gradle message, it seems that you need to accept the Android SDK License, to do that enter the following command on Windows cmd, then try to build again:
C:\Users\CrisDriEnzo\AppData\Local\Android\Sdk\tools\bin\sdkmanager --licenses
Hi, vitaliano.neto..

I manage to accept all licenses, but I'm still having errors:


Code:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
> Failed to install the following SDK components:
      patcher;v4 SDK Patch Applier v4
      platform-tools Android SDK Platform-Tools
      emulator Android Emulator
      build-tools;30.0.3 Android SDK Build-Tools 30.0.3
      tools Android SDK Tools
  Install the missing components using the SDK manager in 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


I did install and SDK components and nothing...
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
686
Try changing these values in config.cxs in targets\android\template
Code:
#ANDROID_GRADLE_VERSION="7.2.0"
#ANDROID_GRADLE_DISTRIBUTION="gradle-7.3.3-all.zip"
And don't forget to delete your build folder first to make a clean build. Good luck!
BTW Did you try to run it on html target? Did it work?
 

Cristiano

New member
Joined
May 15, 2018
Messages
24
Try changing these values in config.cxs in targets\android\template
Code:
#ANDROID_GRADLE_VERSION="7.2.0"
#ANDROID_GRADLE_DISTRIBUTION="gradle-7.3.3-all.zip"
And don't forget to delete your build folder first to make a clean build. Good luck!
BTW Did you try to run it on html target? Did it work?
Hello..
I changed but it didn't work again..
About html5, the game works using MonkeyX and also works on desktop target. With CerberusX none of those targets work. Is there a away to use MonkeyX with android-30? I already changed the config.winnt.txt, downloaded apache-ant-1.10.12....

Thanks
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
686
Hey, sorry for the bad advice. I didn't read properly.
Now I updated my Android Studio and ran into the same issue you had at the beginning.
@Martin s trick of coping the licences folder like described here to the folder of your Android Studio installation solved it here.
If you experience this error during compilation


You have not accepted the license agreements

and you have accepted all the licenses when Android Studio asked you to do so...
fixing this can be done by copying the licenses folder located at

C:\Users\YourPcUserName\AppData\Local\Android\sdk

to the folder

C:\Program Files\Android\Android Studio

After that it should compile fine.
 
Last edited:

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
686
What error messages do you get with the html target? This target should run out of the box.
 

Cristiano

New member
Joined
May 15, 2018
Messages
24
What error messages do you get with the html target? This target should run out of the box.
I fixed the error to run on html5, now it run.. Regarding the licenses, even after I copied, still not work... What about android 30 on Monkey? Is it possible?
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
686
With Monkey I don't have a clue, sorry.
One thing you could try is to build with cerberus for android and then load the resulting project into Android Studio. Sometimes it automatically fixes stuff to make it work and that could also give you a hint what to change. Same for your Monkey approach.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,307
I just have installed the latest Android Studio on my Widnows machine. Installed and accepted their licences of the SDKs and tools INSIDE Android Studio, copied the licenses folder from the %Appdata% to my Android Studio location . A fresh build went through without a problem.

1654764618260.png


1654764646052.png


I rather go overboard on the tools.
 

SLotman

Active member
3rd Party Module Dev
Joined
Jul 3, 2017
Messages
195
Its not possible to use "android 30" with Monkey-X. The last SDK it could use I think it was 28 or 29.

And those do not make the .aab that Google Play requires now - so not much use even if you can have them.
 
Top Bottom