Saturday, July 9, 2011

Development environment

One of the first issues is to get the development environment setup. The recommended IDE is Eclipse, and as I am a regular eclipse user, I will be using that. In addition, I have an Samsung Galaxy, upgraded to 1.6 to use for debugging. This will also be the current limiting factor in what API version I use, as I want to test it in person.

The best steps I have found are at this blog:

Namely:
  1. Install latest version of Java JDK (not JRE)
  2. Install latest version of Eclipse for Java (e.g. not CDT which I usually use). This is currently 3.7/Indigo
  3. Install ADT using Eclipse plugin framework - I installed R11, then a couple of days later updated to R12 when it came out.
Now the basic setup is complete, including Android code samples.

To test this, I created a new project (Snake), from a 1.6 code sample. After creating a new Virtual Android device, it worked fine.

A more difficult job was getting my phone working for debugging. I have Samsung New PC Studio (latest version) installed, however my phone was not showing up under "adb devices". This means the USB drivers are not installed. Unfortunately, there does not seem to be any Samsung drivers around. I tried turning phone USB mass storage mode on and off, turning off and on phone Debug mode, but to no effect.

After a bit of googling, I came across the following post, which describes how to do it. You have to use the Google USB drivers (normally only for google Nexus phone), and edit the inf file. Next time when the USB drivers need to be installed, manually select this folder instead.

NOTE: The folder seems to have been moved in later releases to:
C:\Program Files\Android\android-sdk\extras\google\usb_driver

After a restart, adb was showing the phone as "I7500t1ateSN device". Now when running apps in Eclipse, if the virtual Android device is not open, they automatically run on my phone. Nice! Looks like I'm good to go.

No comments:

Post a Comment