官术网_书友最值得收藏!

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:

  1. 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.

  2. 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

  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Select Preferences... from the LiveCode drop-down menu.
  8. Select Mobile Support from the left navigation pane of the Preferences window.
  9. 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
主站蜘蛛池模板: 台南县| 台江县| 平江县| 广南县| 平果县| 巫山县| 金堂县| 和静县| 卫辉市| 新民市| 房产| 景东| 湘潭市| 宝山区| 吉木萨尔县| 海林市| 得荣县| 乐亭县| 东安县| 张北县| 桃源县| 望谟县| 洞口县| 广灵县| 新乡县| 资源县| 周至县| 凌海市| 南城县| 武陟县| 寻乌县| 龙江县| 会同县| 临朐县| 新邵县| 霍林郭勒市| 临湘市| 剑河县| 博白县| 白城市| 新巴尔虎右旗|