Setting up your mobile environment for Android development
There are a lot of devices made by a multitude of mobile hardware devices that run the Android operating system. In order for us to develop for Android devices, we must have the Android SDK installed on our development computer. In addition, we must configure LiveCode so that it knows where the SDK is installed.
Getting ready
Unlike developing for iOS, you do not need a developer account to obtain the Android SDK.
How to do it...
Setting up your development environment so that you can develop Android apps using LiveCode is accomplished by the following steps:
- Download the latest Android SDK from the following site:
http://developer.android.com/sdk/index.html
Note
You should only have to download the Android SDK once. The SDK Manager gives you the flexibility to install additional packages as well as future updates.
- If you are using a Windows or Linux based computer to develop your Android app, you will also need to download and install the Java SDK from the following site:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Double-click on the Android SDK compressed file (it will be named similar to
adt-bundle-mac-x86_64-20140321.zip
) to uncompress/unzip the package. - Install the Android SDK and, if you are using a PC, the Java SDK. On Mac, navigate to the newly installed Android SDK folder. Run the android program by navigating to sdk | tools. This loads the Android SDK Manager.
- Using the Android SDK Manager, ensure that you have the desired tools and documentation installed. Most developers do fine with the defaults; your situation might be different. Also, you should install any available updates.
- Ensure that you install the Android 2.2 (API 8) SDK platform tools. If you fail to do this, you will run into an error when trying to configure LiveCode for Android development. The Android SDK Manager will handle downloading, unzipping, and installing the tools and updates you select.
- Select Preferences... from the LiveCode drop-down menu.
- Select Mobile Support from the left navigation pane of the Preferences window.
- Use the … button to navigate to the location of the Android SDK on your development computer. When this is done correctly, you will see your specific path listed after JDK Path on the Preferences dialog window.
How it works...
In this recipe, we downloaded and installed the latest Android SDK. Next, we configured LiveCode so that LiveCode's IDE is linked to our Android development SDK. This will now allow you to develop Android applications with LiveCode.
There's more...
If you run into any installation problems, as with any online software, it is a good idea to check the software documentation instructions. Typically, there is a readme
text file in the directory with the installation files.
Configuring your computer for use with LiveCode is pretty straightforward when you are developing for iOS devices. This is true for Windows, Mac, and Linux machines. When developing for Android devices, the configuration process can be a bit more difficult on a PC running Windows than on a Mac. Please consult the LiveCode documentation if you run into any problems.
See also
- The Setting up your mobile environment for iOS development recipe
- The Configuring standalone application settings for Android applications recipe