|
Tuesday, 10 March 2009 14:04 |
|
Here's the steps I had to do to get the Android SDK installed & working on my Ubuntu laptop. It started off as a stream-of-consciousness log of what I'd done, but has since been updated to fix mistakes I made so hopefully it still hangs together. Broadly speaking this follows the steps in Installing the Android SDK, with the exception of pointing out the hiccups I encountered.
Installing the SDK: - Installed the Android SDK requirements as per System Requirements:
- Downloaded Eclipse 3.4 Ganymede from here: Eclipse IDE for Java EE Developers
- Unzipped to ~/wandroid/eclipse
- Note: I needed EE version because the Android editors wouldn't work as mentioned below. Of course being new to Eclipse I hadn't downloaded this first time as the page listing the millions of available eclipse versions doesn't make it obvious which versions have WST, and my sensi di ragno weren't inspired.
- Installed Java 6
- apt-get install sun-java6-bin (as per the Installation Notes which are at the end of the Installation page, below the section on "After Installation"............you know, right where you wouldn't expect them)
export PATH=/usr/lib/jvm/java-6-sun-1.6.0.07/bin/java:$PATH but still got no banana. Went back and re-downloaded the Ganymede version for Java EE developers because it contains full WST support whatever that may be. This webpage Compare Eclipse Packages compares the various Eclipse versions, however don't use links on that page because they are old. Use the link above instead.Extensions then installed ok, but next step failed with 2 errors:"Could not open selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences. " " org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException" Teh innahwebs seems to think this a problem with the gcj shite, which on my machine was resident in /usr/bin/gij-4.2, so I uninstalled it completely. To remove it I had to first find out what application installed itcianer@Feegle:~$ dpkg -S /usr/bin/gij-4.2 gij-4.2 cianer@Feegle:~$ apt-get remove gij-4.2 Now the active version of java (ultimately) points at /usr/lib/jvm/java-6-sun/jre/bin/java cianer@Feegle:~/wandroid$ which -a java /usr/bin/java cianer@Feegle:~/wandroid$ ls -la /usr/bin/java lrwxrwxrwx 1 root root 22 2009-03-04 14:54 /usr/bin/java -> /etc/alternatives/java cianer@Feegle:~/wandroid$ ls -la /etc/alternatives/java lrwxrwxrwx 1 root root 36 2009-03-05 10:28 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java cianer@Feegle:~/wandroid$ Now the second message is gone. Error about port 8700 still appears occasionally but doesn't seem to cause issues. Go figure.
Communicating with Phone:
Building Hello World Application: This is not an issue! The SDK API is backwards compatible. After much hair-tearing I realised that the transfer was failing because I had the G1 plugged into a USB hub. I have no idea if all hubs have this problem but bypassing the hub and connecting the G1 directly to the computer solved the problem. |