This tutorial is written for LiveCode 6.6.2 stable and may not work with other releases. This document will not be updated.
This Video by a member of LiveCode may help also to implement Android SDK with LiveCode.
Install Java JDK 7
Many systems will have the JDK installed already. If you don't have JDK installed you can download it over the here.
Install Android SDK
Click you can download the Android SDK from here. Don't download the Eclipse ADT as it contains the Eclipse editor which you don't need if you use LiveCode. Download the Standalone Android SDK Tools. In my case I download it for Mac. You can install the SDK in any directory you like. I usually create a directory called SDK in to my user directory and move all SDKs into there.
After the Android SDK has been installed Android has to be configured over the android application in the tools folder.
After double clicking the android application you'll see the following screen below:
You need to install at least the "Tools" and "Android 2.2 Froyo" packages. It is recommended to install all the Android target platforms for which you would like to build. So you would also tick "Android 4.4.2" if you would want to install your app on to the "Android 4.4.2 target system".
Create a virtual device
You can create a virtual android device with which you can test your applications. You have to note however that this is incredibly slow as Android does not use an Emulator but is loading a whole operating system in a virtual machine. So the preferred way to test is by using a physical Android device or the IOS emulator to test the basic mobile functionality. If you however don't have a physical device and need to test your application on Android then a virtual device can be used. In the Android application choose "Tools" -> "Manage AVDs".
To create a new virtual device click on to the "New" button.
Next you can specify what device you want to create. To start with I've created a tablet device.
After that you can start the virtual device. Please note that this will take several minutes.
In LiveCode click on to "Preferences" -> "Mobile Support". Then you can choose the path to the Android SDK. In case you get a message that the Android SDK path is not valid it is possible that you forgot to install the "Tools" or "Android 2.2" packages or then you use an Android Version which is not supported. As LiveCode is always a step behind the SDK and needs to upgrade the code again when Google made changes to the SDK it is possible that you need to use an older version. See this post for details.
Once this is done you configure the Standalone Settings.
Downgrading the Android SDK to a previous version
There is no straight forward way. Google does hide the older versions of the tools package. It is however possible to download an older version. I've found a way over this stackoverflow entry.
To find the old tools, you need to determine the SDK version number that you want to revert to. On the Google Android SDK webpage, you will find a Revisions list that shows all the SDK numbers, e.g.
- SDK Tools, Revision 22.6.2 (March 2014)
- SDK Tools, Revision 22.3 (October 2013)
Make a note of the exact revision number, like "22.3".
Now download the tools by using the following pattern:
Once you download the file and unzip it, you will find a single folder called 'tools'. Now replace your android-sdk/tools folder with this new one. Once this is complete you can double click the "android" application and follow the steps above.