Getting started with Android programming

You need to have a working knowledge of Java to undertake this mission. If you don't, you can always first study our Fundamental and Advanced lessons.
So assuming you're a Javanaut, since you're still reading this, you can download and install the Juno version of Eclipse.
(The later Kepler edition didn't work with the Android SDK that I tried )
Startup Eclipse and choose
Help, Install new software
Click Add top right
enter "ADT" as name and the following URL for the Location:
Check Developer tools and proceed.
After Eclipse has restarted, you choose
Window, Android SDK manager
Here you choose the build tools and the versions that you want to build for.
2.2 and 4.2 are good for now.
Now make a project by choosing
File, New, Other, Android, Android Application Project
Use a reversed domain name that's yours to use in the package name.
Couple times Next/Enter, taking the defaults, till the project is generated.

Now, running the app is a different matter. You could use a virtual device, but if you start one up, you can go watch a plant grow and then come back and maybe it's up and running.
So much better is to use Oracle's VirtualBox and Android ISOs.
I'm using the AndroBOX-2.3.r.1-generic.iso and the android-x86-4.2-20130228.iso at the moment.
You can install an ISO by just clicking on the disk icon in VirtualBox, as shown in the picture.
Be sure to set the forwarding of port 5555 else you can't connect to the device from Eclipse.
android-x86-4.2-20130228.iso has a lengthy setup, but Virtualbox has this magnificent snapshot capability, so when you've completed the setup, you make a snapshot and use that later on to start it.
Run, External tools, external tools configuration
you can have a batch file/script connect to the device as shown in the picture.
So each time you wanna work with a Virtualbox device you click the external tool button

and you're good to go.
The batch file contains just the command adb connect localhost and I've put it in the folder where adb sits :
Now all you have to do when running a project is choose the device.


Copyright © 2000-2013 System Exclusive & Multi Midi (NL) All rights reserved

Terms, conditions, disclaimer