How do I setup the buildsystem for Android? I get an error...

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hidemat

I’m following this guide for compiling for Android.

I’m working on windows 10. So I added an environment variable called ANDROID_SDK_ROOT pointing to AppData\Local\Android\Sdk

Then I ran this command from the sdk root directory:
tools/bin/sdkmanager --sdk_root=ANDROID_SDK_ROOT --licenses

but i got this error:

Exception in thread "main" java.lang.NoClassDefFoundError

Does anyone know what I’m doing wrong?

:bust_in_silhouette: Reply From: hidemat

Although it seems I do not need to run this command. I installed Android studio and made sure I had all the dependencies installed:

  • Android SDK Platform-Tools version 30.0.5 or later
  • Android SDK Build-Tools version 30.0.3
  • Android SDK Platform 29
  • Android SDK Command-line Tools (latest)
  • CMake version
  • NDK version 21.4.7075529

Also made sure to add the ANDROID_SDK_ROOT environment variable.

With this I was able to compile for android using scons.