Android Studio Setup Checklist - 10.0.3 rc-1 and later

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 11 or later

As of 10.0.3 rc-1, higher versions of JDK should not interfere with LiveCode's ability to deploy. JDK 11 can be downloaded from: https://www.oracle.com/java/technologies/downloads/#java11

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.11.jdk
  • On Windows: C:/Program Files/Java/jdk-1.11

2. Install SDK platform Android 15/API 35

In Android Studio, go to the SDK Manager. From there, in the SDK Platforms tab, find either Android 15.0 ("Vanilla Ice Cream") 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-35/
  • On Windows: C:/Users/<username>/AppData/Local/Android/sdk/platforms/android-35

3. Install SDK build-tools 34.0.0

Generally, LiveCode requires build-tools 34.0.0 or higher. However, building for later versions of Android may require higher. It is recommended to install the latest but this lesson will cover the installing the minimum requirements.

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 34.0.0 then click on Apply.

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

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

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.11.jdk
  • On Windows: C:/Program Files/Java/jdk-1.11

Troubleshooting

Deployment to Android stalls endlessly at "Installing app on target device"

It's possible that adb server is simply not responding. Thus, it is suggested to open command prompt/terminal, use cd to navigate to the platform-tools folder (this is a sub directory of the sdk root folder; see above for its default location on your system), use the following commands in order and try again:

On Mac/Linux:

./adb kill-server
./adb start-server

On Windows:

adb.exe kill-server
adb.exe start-server

0 Comments

Add your comment

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