This is a minimalist Hello World example that uses only the most basic Android tools.

Requirements and assumptions

This example assumes Linux. You may have to adjust the syntax for your own platform.

Setting up the Android SDK

After unpacking the SDK release:

  1. Install additional packages using the SDK manager.
Don't use `android update sdk --no-ui` as instructed in the bundled Readme.txt;
it downloads some 30 GB of unnecessary files.
Instead use the interactive SDK manager `android sdk`
to get the recommended minimum of packages.
  1. Append the following JDK and SDK directories to your execution PATH. This is optional, but the instructions below assume it.
* JDK/bin
* SDK/platform-tools
* SDK/tools
* SDK/build-tools/LATEST *(as installed in step 1)*
  1. Create an Android virtual device.
Use the interactive AVD Manager (`android avd`).
You might have to fiddle a bit and search for advice;
the [on-site instructions][createAVD] aren't always helpful.

(You can also use your own device)
  1. Run the device:
emulator -avd DEVICE
  1. If the device screen appears to be locked, then swipe to unlock it.

Leave it running while you code the app.

Coding the app

  1. Change to an empty working directory.
  2. Make the source file: