How To: Set up a Windows Dev Environment for Android

These are the steps we used to arrive at a working, windows based development/sandbox environment (Collected here for ease of use, with references to the original source of things

Installation steps (See http://developer.android.com/sdk/installing.html)

NOTE You should exit Eclipse and restart it if you install any new Android SDK components as it does not seem to pick them up automatically

  • Install Eclipse 3.5.2 (http://www.eclipse.org)
    • Installed to C:android-sandboxeclipse
  • Install Android SDK R06 (http://developer.android.com/sdk/index.html)
    • Installed to C:android-sandboxandroid-sdk_r06-windows
    • Had to force download of https url’s over http (would prefer https to authenticate the source of the files, but it refused to work)
    • Add C:android-sandboxandroid-sdk_r06-windowstools to the PATH
  • Installed the following using the SDK manager
    • Documentation for SDK, API 8, revision 1
    • SDK Platform Android 2.2, API 8, revision 1
    • Samples for SDK API 8, revision 1
    • Google APIs, Android API 8, revision 1
    • SDK Platform Android 2.1-update1, API 7, revision 2
    • Samples for SDK API 7, revision 1
    • Google APIs, Android API 7, revision 1

Potential Additions to the basic Eclipse based environment

SDK Notes

  • Eclipse based ADT
    • Can also use other IDE’s (IntelliJ), or plain text editors.
    • Command line tools are supplied as part of the SDK

NOTE To facilitate continuous integration, we are starting projects the command line tools (it will generate a build.xml for us), and then converted to an eclipse android project. This should permit building things on a hudson machine (or slave) and potentially allow sonar/check bugs/pmd and the like (the possibility of using the metrics tools has not yet been investigated, but is on the list), but still let us leverage the Eclipse based sdk integration for ease of development.

Sample new project creation

**** Make sure the directory containing the android tools is in your path prior to starting this

  • android list targets
    • Pick which installed api/target platform you want this project to be for
  • android create project –target <target from last step> –name <nameOfProject> –path ./nameOfProject –activity <InitialActivityName> package <packageName>
    • Example from our sandbox
      • android create project –target 1 –name storeLocator –path ./storeLocator –activity StoreLocator –package ca.intelliware.android.test
  • Open Eclipse
  • Create a new java project from existing files
  • Once the project is open
    • Right click on the project
    • Select Android Tools
    • Select ‘Convert to android project’ to add the android abilities in eclipse

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply