LiveCode Android Studio Setup Checklist

This guide assumes you have attempted to set up for Android deployment on MacOS or Windows through use of Android Studio and exists to quickly go over what may have been missed or done incorrectly.

1. Install JDK 8

At present, LiveCode can not deploy to Android with newer versions of JDK than 8. Anything more recent than this must be uninstalled. JDK 8 can be downloaded from: https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html

An Oracle account is required - creating one is free.

Please ensure that the version you download is appropriate to your OS and architecture; an ARM Mac requires the MacOS ARM64 DMG Installer. If installed correctly, you should see one of the following folders:

  • On MacOS: /Library/Java/JavaVirtualMachines/jdk-1.8.jdk
  • On Windows: C:/Program Files/Java/jdk-1.8

2. Install SDK platform Android 13/API 33

In Android Studio, go to the SDK Manager. From there, in the SDK Platforms tab, find either Android 13.0 ("Tiramisu") or Android API 33 (whichever you see) and if it is unchecked, check it. Click on Apply.

If installed correctly, you should see one of the following folders:

  • On MacOS: /Users/<username>/Library/Android/sdk/platforms/android-33/
  • On Windows: C:/Users/<username>/AppData/Local/Android/sdk/platforms/android-33/

3. Install SDK build-tools 31.0.0 (and nothing above)

LiveCode requires build-tools 30.0.0 or higher. However, LiveCode can not deploy to Android if it finds a higher version of build-tools than 31.0.0. As such, it is best to install 31.0.0 and necessary to uninstall anything newer.

In Android Studio, go to the SDK Manager. From there, in the SDK Tools tab, check the Show Package Details box. This will expand Android SDK Build-Tools X (where X is the latest version). While viewing the package details for that, check the box for 31.0.0 and uncheck all boxes for version numbers greater than 31.0.0.

If installed correctly, you should see one of the following folders:

  • On MacOS: /Users/<username>/Library/Android/sdk/build-tools/31.0.0/
  • On Windows: C:/Users/<username>/AppData/Local/Android/sdk/build-tools/31.0.0/

If in the /build-tools/ folder you find other subfolders with numbers greater than 31.0.0, delete them; LiveCode will need them gone.

4. Install Android SDK Tools (Obsolete)

In Android Studio's SDK Manager, in the SDK Tools tab, uncheck the Hide Obsolete Packages and Show Package Details boxes then look and check the box for Android SDK Tools (Obsolete). Click on Apply.

If installed correctly, you should see one of the following folders:

  • On MacOS: /Users/<username>/Library/Android/sdk/tools/
  • On Windows: C:/Users/<username>/AppData/Local/Android/sdk/tools/

5. Reset Android SDK root in LiveCode

To ensure LiveCode is expecting the setup you should now have, you will need to clear the SDK root folder setting and set it again, even if that location hasn't actually changed. Go to Livecode -> Preferences and then to the Mobile Support tab. There, click on the x on right end of the field for Location of Android development SDK root to empty it, then choose the SDK root folder. Depending on system and on whether or not you used default settings, this should be:

  • On MacOS: /Users/<username>/Library/Android/sdk/
  • On Windows: C:/Users/<username>/AppData/Local/Android/sdk/

With everything done correctly, a JDK filepath should be reported underneath, saying that it is now:

  • On MacOS: /Library/Java/JavaVirtualMachines/jdk-1.8.jdk
  • On Windows: C:/Program Files/Java/jdk-1.8

2 Comments

Trevix

A few versions have passed since this post.
Having messed up with Android studio, LC 10 on Sonoma wasn't installing anymore my standalones on Android. So I disinstalled Java to restart from scratch.
In this post it is stated to use the MacOS ARM64 DMG Installer, so I did: in the infinite list of JDKs the oldest one with a Arm installer is the 8u381 but LC didn't like it (no Jdk accepted).
My previous JDK version was 8u231 but it is listed as x64. I tried to install it anyway but to no avail.
Question is: on a M1 Mac is it ok to use the latest version (JDK 8u391) or it matters? Thanks

Panos Merakos

Hello Trevix,

If you are on an ARM Mac, it is recommended you use the ARM64 installer. Using the (currently) latest version, that is JDK 8u391, it should work.

Currently the JDK path is detected by getting line 1 of shell("/usr/libexec/java_home") and then LiveCode checks if it is valid.

However, on an ARM mac, with the latest 8u391 JDK update, this might return:

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home and this fails the LC validity tests, so the JDK path returned is empty.

So if this is the case, you first have to delete /Library/Internet Plug-Ins/JavaAppletPlugin.plugin and then choose the SDK root folder. Hopefully now the correct JDK path will be auto-filled.

Hope this helps

Regards,
Panos

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.