Overview
So I've gotten it into my head to build my first really real real Android application, and since I know Debian so well I've chosen this as my development platform.
What I had to do
Like anything in Linux, this took some time and concentration to get working perfectly. I started with a basic desktop installation of Debian Squeeze, then I:
- Installed the NX Client & Node packages
- Installed Oracle's JDK
- Installed Eclipse
- Installed the Android SDK
- Installed the Android Development Tools (ADT)
- Watched some videos
Installing NoMachine
This thing is the end-all be-all in remote desktop access for Linux. Get it, install it, love your life.
Get it here
Installing Oracle's JDK
As of probably 30 minutes ado Oracle released Java 7, but since as of right now Java 6 is still pretty standard (and has a repository available for squeeze) I used it instead. I tested my JRE using chrome, and I've included instructions on how to add the JRE plugin.
First, remove the openJDK packages:
aptitude remove openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib
Now, add the sun repositories to /etc/apt/sources.list. You may have to adjust your sources.list to remove duplicates.
deb-src http://security.debian.org/ squeeze/updates main non-free deb http://security.debian.org/ squeeze/updates main non-free deb-src http://mirrors.kernel.org/debian/ squeeze main non-free deb http://mirrors.kernel.org/debian/ squeeze main non-free
Install the Oracle JDK:
aptitude update aptitude install sun-java6-jdk
Update your java shortcuts and environment:
update-java-alternatives -s java-6-sun echo 'JAVA_HOME="/usr/lib/jvm/java-6-sun"' >> /etc/environment
Setup your Google Chrome plugin:
updatedb locate libnpjp2.so mkdir /opt/google/chrome/plugins ln -s /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libnpjp2.so /opt/google/chrome/plugins/libnpjp2.so
Once this is finished, test it using Java's tester at http://java.com/en/download/testjava.jsp. You'll probably get the Java was blocked because it is out of date pop-up toolbar. Click the Run This Time button. Also test your environment variables by running the following at the command prompt:
root@frankentux:~# java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
If it works then congratulations! It looks like Java is working OK.
Installing Eclipse
This is thankfully simple. Head on over to http://www.eclipse.org/downloads/ and download the 'classic' version. I created a /bin/ folder in my home directory and extracted the tarball there. No further configuration needed.
Installing the SDK
The Android SDK Installation Guide is extremely helpful from this point on. I downloaded the Latest version of the SDK for Linux available and extracted in next to the Eclipse directory in my new /bin/ folder.
Once this was complete, I updated the SDK and SDK platform tools ONLY:
chuck@frankentux:~/bin/android-sdk-linux/tools$ ./android
Installing the Android Development Tools (ADT)
If you're using the amd64 version of squeeze, there are some library problems with ncurses that need to be solved first, as well as some additional libraries needed to run the emulator:
aptitude install ia32-libs lib32ncurses5 lib32stdc++6
Now that that's out of the way, you can follow the instructions on how to install the ADT plugin.
Get Educated
Watch some of these videos! The stuff for beginners is essential, not to mention you still need to pick which release to target. It's important to know why you are choosing the release you are choosing and how this will affect your SDLC. Anyway, good luck kiddos!