Quick Start Guide for AVM - Android

Get started on Appemble development environment for Android, and run the “Hello World” application on Android Emulator.

1 Download and Install Android SDK (ADT Bundle), pre-requisite JDK
2 Download and Install appemble-android-library
3 Download and Install appemble-android-template
4 Run template app
Good Read FAQ, Tutorials, How to create a new App - Android

Download and Install Android SDK (ADT Bundle)

Pre-requisite - Java Development Kit. If you do not have it already installed, download and install the latest Java SE Development Kit from Oracle’s download site. For more help click here.

Download ADT Bundle from Android SDK Download site .

  1. Unpack the ZIP file (named adt-bundle-<os_platform>.zip) and save it to an appropriate location, such as Program Files or a “Development” directory in your home directory.

  2. Open the adt-bundle-<os_platform>/eclipse/ directory and launch eclipse.

  3. Check the compatibility of ADT by clicking System Requirements on Android SDK Download site and Set the Java Runtime Environment.

    • Go to Windows | Preferences | Java | Installed JRE's | Add. Select Standard VM and the JRE home (Generally installed in <your drive>:\program files\java\jdk1.6.0_xx (xx is your version number)).
    • Select jre6 before closing the dialog box.
    _images/Eclipse_Config_1.png

  4. Install Android 2.2

    • In Eclipse go to Windows | Android SDK Manager
    _images/android_sdk_setup1.png
    • Scroll to Android 2.2 and select it. Make sure that Google APIs is checked. Click on Install Packages
    _images/android_sdk_manager.png

  5. Create Android Virtual Device

    • In Eclipse go to Windows | Android Virtual Device Manager
    _images/avd_sdk_setup2.png
    • Click on New
    • Select any 4 inch device (preferably). You can create a device of your choice
    • Give a name to the AVD.
    • For SD Card you can give 200 MiB
    _images/avd_manager_new.png _images/avd_manager_filled.png

Download and Install appemble-android-library

  1. Create <your workspace> dir where you want to download the appemble-android-library.
  • Windows 7 - c:users<your user name><your workspace>
  • Windows XP c:documents and settings<you username><your workspace>
  • Linux your home directory<your workspace>
  1. Download library
Git Zip

Open Git Bash or any other GUI for Git

  • change directory to <your workspace>

    eg. cd workspace

  • Clone using git clone https://guest_appemble@bitbucket.org/appemble/appemble-android-library.git

    For password contact support@appemble.com.

    _images/gitclonelibrary.png

appemble android library.zip

Library and template project will be downloaded as one zip
  1. Import appemble-android-library into Eclipse -

    Select File | Import | General | Existing  Projects into <your workspace>. Click Finish.

Note

Make sure that Copy projects into workspace is unchecked.

_images/eclipse_import_project_1.png _images/android_projectimport.png

Download and Install appemble-android-template

1 Git only - Download appemble-android-template. If you downloaded library using zip, you can skip this step and go to step 2.

In the same <your workspace> dir, clone appemble-android-template using git clone https://guest_appemble@bitbucket.org/appemble/appemble-android-template.git


_images/gitclonetemplate.png

2 Import appemble-android-template into Eclipse -
Select File | Import | General | Existing  Projects into <your workspace>. Click Finish.

Note

Make sure that Copy projects into workspace is unchecked.

Run template app

  • Select the android-appemble-template project.
  • Right click on Run As | Android Application. The app can be launched on emulator or on a Android device.
_images/android_run.png

_images/Android_First_App.png

FAQ

  • Can I import the projects in a separate folder and not in the eclipse workspace?

Yes you could do that but make sure both the library and the template project are in the same parent folder. If they are in different folders, correct the path of the appemble-android-library in the project appemble-android-template. The library should have a green checkbox and NOT a red cross.

_images/android-template-properties.png
  • My template project has a lot of compilation errors

    • Make sure that the appemble-android-library project is present in the workspace. Otherwise download and import the appemble-android-library from here and follow the instructions to import the project.
    • Make sure that the library appemble-android-library is included correctly in the project - Click on Project properties and select Android. In figure below, if you see a red cross instead of a green check box, remove the library and add it back by clicking on Add.
    _images/android-template-properties.png
    • If you still have errors, Select the project appemble-android-template and go to Project Properties. Go to Java Compiler and Enable project specific settings. Now Select 1.5 and click yes and then Apply. Again select 1.6 and click Yes and then Apply. Restart Eclipse.
    • If you still run into issues, please contact support@appemble.com.