License error

badower

  • Posts: 32
Hi, I've spent many hours trying to get over an Android compile error, which says License for API 34 not accepted.
I manually downloaded and accepted all 6 licenses but still same error.
I used the command line tools and issued :-
sdkmanager --sdk_root="C:\STENCYL\Stencyl WORKS and EXE's/android-sdk/android-sdk-windows" --licenses

When I downloaded the Android SDK and Tools to compile,  I was not asked to accept licenses, so I did it manually.

Much appreciate any help.

Thanks
Justin


« Last Edit: May 26, 2025, 08:57:43 pm by badower »

Luyren

  • *
  • Posts: 2816
I recommend asking over Discord, as the community has mostly moved there: https://community.stencyl.com/index.php/topic,48592.0.html

That said, going over some old messages, I found this:
Quote
Alright, I was finally able to test my game on Android. I looked through a bunch of different sources online, so I can't promise this'll be entirely intelligible, but I'll do my best:

Install Android Studio,
Install Android SDK Command-line tools (latest),
If JDK not installed, install JDK and set JAVA_HOME to directory of JDK folder,
Run Command Prompt via Administrator,
Type in "cd C:\Users(yourname)\AppData\Local\Android\Sdk\cmdline-tools\latest\bin",
Type in "sdkmanager.bat",
Type in "sdkmanager --licenses", then accept all licenses as prompted,
Exit Command Prompt, then go to C:\Users(yourname)\AppData\Roaming\Stencyl\stencylworks\android-sdk\android-sdk-windows\licenses via Windows Explorer,
Save a copy of the existing license files if you're squeamish, then replace all files with the license files in C:\Users(yourname)\AppData\Local\Android\Sdk\licenses,

This finally stopped the error from happening, and my game ran as normal.

This issue has been fixed in the private builds, but a new public released hasn't happened yet.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

badower

  • Posts: 32
Luyren, many thanks for your help ! Yes, I installed Android Studio and set my System Variable ANDROID_HOME to it's SDK and it works beautifully.  Even things that didn't work with the Flash Player now work 100%.
I was stuck in a mental rut until I saw the article shown to me by Luyren which mentioned Android Studio.
Then I realized I had been following an article dated 1999, which at the time was correct but no longer.
 It suddenly dawned on me,  that if Stencyl says licenses have not been accepted even though I loaded them with the Android Command Line tool,  its obviously no longer looking there ! But I was stuck in a mental rut and failed to realize it.

Thanks again.
Justin