Developing first Android app on Windows 8 : Step 3 – Hello World

Follows on from Developing first Android app on Windows 8 : Step 1 – Installing Android Developer Tools

Within eclipse, click File->New->Android Application Project.
30newproj
At “Creates a new Android Application”, give the application, project and package a name.31create
At “Configure Project”, take the defaults.
32create
At “Configure Launcher Icon”, take the defaults
33create
At “Create Activity” take the defaults.
34create
At “Blank Activity” take the defaults and press Finish.
35create
Eclipse now displays the project and code generated.
36create

Make the Android device available to this VM via removable devices.
80connect

This generates a few lines in syslog.

steve@ubuntu:~/adt-bundle-linux-x86_64-20131030/eclipse$ grep usb /var/log/syslog|tail -6
Jan 13 14:03:05 ubuntu kernel: [ 7039.022771] usb 1-1: new high-speed USB device number 5 using ehci-pci
Jan 13 14:03:05 ubuntu kernel: [ 7039.241720] usb 1-1: New USB device found, idVendor=18d1, idProduct=4e42
Jan 13 14:03:05 ubuntu kernel: [ 7039.241724] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Jan 13 14:03:05 ubuntu kernel: [ 7039.241746] usb 1-1: Product: Nexus 7
Jan 13 14:03:05 ubuntu kernel: [ 7039.241749] usb 1-1: Manufacturer: asus
Jan 13 14:03:05 ubuntu kernel: [ 7039.241750] usb 1-1: SerialNumber: 015d4a5ed73c1a0b
steve@ubuntu:~/adt-bundle-linux-x86_64-20131030/eclipse$ date
Mon Jan 13 14:04:39 PST 2014
steve@ubuntu:~/adt-bundle-linux-x86_64-20131030/eclipse$

And a new entry visible via lsusb.

steve@ubuntu:~/adt-bundle-linux-x86_64-20131030/eclipse$ lsusb
Bus 001 Device 005: ID 18d1:4e42 Google Inc. Nexus 7 (debug)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. 
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
steve@ubuntu:~/adt-bundle-linux-x86_64-20131030/eclipse$

Compile+run the newly generated code from within eclipse.
90run
91run
92run

The Android device should now be running your app.
Screenshot_2014-01-13-20-04-47

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s