Android Hola Mundo

El objetivo de este ejemplo es dando los mínimos pasos, crear un hola mundo gráfico para Android totalmente funcional. Partimos de tener un Android SDK instalado.

  1. Creamos la máquina virtual de Android 2.1

create avd --target 7 --name master21.avd
Created AVD 'master21.avd' based on Google APIs (Google Inc.), with the following hardware config:
hw.lcd.density=160

y la arrancamos

emulator -avd master21.avd

android create project --target 7 --name HolaMundo --path holaMundo --activity Hola --package com.mastersoftwarelibre

cd holaMundo/
ant debug
Buildfile: build.xml
    [setup] Project Target: Google APIs
    [setup] Vendor: Google Inc.
    [setup] Platform Version: 2.0
    [setup] API level: 5
...
BUILD SUCCESSFUL
Total time: 13 seconds
ls -l bin/HolaMundo-debug.apk 
-rw-r--r-- 1 acs acs 13194 2010-05-13 22:39 bin/HolaMundo-debug.apk

adb install bin/HolaMundo-debug.apk
153 KB/s (13194 bytes in 0.083s)
        pkg: /data/local/tmp/HolaMundo-debug.apk
Success

adb  uninstall com.mastersoftwarelibre
Success

AndroidHolaMundo (last edited 2010-05-13 21:52:19 by AlvaroDelCastillo)