The steps for setting up an Android development environment are:
- Install the Oracle SE JDK.
- Install the Eclipse Integrated Development Environment.
- Install the Android Software Development kit (SDK) and the Eclipse Android Development Tools (ADT) plugin as described below.
- Set up the Android Virtual Devices (AVD) as described below.
Android SDK/ADT Setup Android SDK and Eclipse ADT Plugin
This method installation uses an existing IDE (Eclipse) to download and install the desired Android packages:
- Download the Android SDK Manager from the Android Developers site. Note: Under Other Platforms, I downloaded (android-sdk_r21.0.1-windows.zip, 99,107,847 bytes). I extracted the downloaded file and then moved the
resulting "android-windows" folder to the root of my C: drive.
- Download and Configure the Eclipse Android Development Tools (ADT) plugin as directed from the Android Developers, paraphrased below:
- Inside Eclipse select: "Help", "Install New Software", "Add".
- In the Add Repository dialog, enter "ADT Plugin" for the Name and "http://dl-ssl.google.com/android/eclipse/" for the Location, then select "OK".
- In the Available Software dialog, select the checkbox next to Developer Tools and select "Next".
- Accept the list of tools to be downloaded and the license agreement. After the installation completes, restart Eclipse.
- Once Eclipse restarts, specify location of the Android SDK (c:\android-sdk-windows) to finish the ADT configuration.
- In Eclipse open the SDK Manager to begin the process of downloading the rest of the Android SDK files.
- In the SDK, the components for the latest Android version are checked (API 17). In addition, check the following items Android SDK Tools and Android SDK Platform-tools under Tools. Also select Goggle USB Driver under Extras. Click the button to install the selected packages.
- Next, Install the SDK components for API 10. This includes: SDK Platform, Samples for SDK, Google APIs, and Intel Atom x86 System Image.
- After the install completes, you may wish to add the \tools and \platform-tools directories to the PATH environment variable.
- To verify the installation, enter and run the First Android Program.
Android Virtual Device Setup Eclipse ADT Android Emulator
Android programs can be tested on desktop computers with Android emulators know as Android Virtual Devices (AVD). To set up an AVD in Eclipse:
- Open the Android Virtual Device Manager by selecting <Window> <Android Virtual Device Manager>.
- Select <New> and enter specifications. I set up two AVDs with these specifications:
|Settings||API 10||API 16|
|Device||5.4" FWVGA(480 x 854: mdpi)|
|Target||Android 2.3.3 - API Level 10||Google APIs(Google Inc) - API Level 16|
|CPU/ABI||ARM (armeabi)||ARM (armeabi-v7a)|
|Memory Options||RAM 512; VM Heap 16||RAM 512; VM Heap 48|
|Internal Storage||200 MiB|
|SD Card||64 MiB||1024 MiB|
Android Application Install Install Android Application on Physical Device
To install and run app on a real device:
- Turn on Android device.
- Connect the Android device to the development computer using a USB Cable.
- Enable USB debugging on Android device.
- Note: On Android 4.0 and newer USB debugging is under Settings -> Developer Options.
- Note2: On Android 4.2 and newer, Developer Options is hidden by default. To make it
available, go to Settings -> About and tap the Build Number seven times. Return to
previous screen to now find the Developer Options.
- In Eclipse, select the project and make sure none of the Android simulators (AVDs) are selected.
- From the tool bar, select Run -> Run as -> Android Device -> OK. Eclipse should install the application to the Android device and start the app.
Top | ADK/SDK Setup | Virtual Device Setup | Android Application Install