In case anyone else is interested in a step-by-step guide to setting up an Android development environment on a Debian Linux system, here's (minus some typos that I retried), what I did:
First, system-administrator steps, as root:
Install the tools I was missing, and make them the defaults. Having the wrong version of java or keytool make for mysterious errors.
apt-get install sun-java6-jdk sun-java6-jre eclipse ant-doc
update-alternatives --config javac
update-alternatives --config java
update-alternatives --config keytool
Install the Android development stuff, from
http://developer.android.com/sdk/index.html
cd /usr/local/lib
tar xvfz ~jleonard/android-sdk_r13-linux_x86.tgz
Then set the permissions to something closer to what I'm used to:
find android-sdk-linux_x86/ -nouser -print0 | xargs -0 chown root.staff
find android-sdk-linux_x86/ -print0 | xargs -0 chmod go-w
Then have it update to get the various SDK targets:
cd tools
./android list sdk
./android update sdk
Then a bunch of user steps:
Add relevant stuff to my to PATH; I appended
:/usr/local/lib/android-sdk-linux_x86/tools:/usr/local/lib/android-sdk-linux_x86/platform-tools
Make a directory for Android projects
cd src
mkdir android
cd android
I then scp'd over my keystore from my other computer; but if this were my first install, it'd be
keytool -genkey -v -keystore release.keystore -alias signkey -keyalg RSA -keysize 2048 -validity 20000
(This also involves picking passwords, and new key ID stuff)
Then, time to generate a project
android create project --target android-13 --path example --package com.slimy.example --activity example
cd example
In AndroidManifset.xml, add an SDK version tag:
<uses-sdk android:minSdkVersion="13" />
Also, build.properties needs to know about the signing key, append
key.store=../release.keystore
key.alias=signkey
Building the project is a simple
ant release
To install and test it, connect an Android device, and enable USB debugging
adb install bin/example-release.apk
It's also quite possible to test with a software simulator, but because they're emulating a different instruction set (that's then running bytecodes), it's significantly slower than testing with real hardware.
For a debug version, doing
ant install
will build and install with a debug key.
ant uninstall
can also be useful.
Steps not involved in the process: Writing any code, paying any money. Doing an app that's more than a "Hello, World" obviously involves editing the relevant .java classes, and setting up to distribute through the Android Marketplace involves a $25 registration, which I haven't yet done.