Happy Thursday everyone!
I've been getting LOTS of comments and questions on how to setup the runtime environment, so our first post is going to be about setting up the runtime environment. If you have any questions or problems, feel free to email me or leave a comment.
Next, because many people asked that we have a refresher on Java, I will be doing just that. For a few weeks, I will post some tutorials on Java; although I feel that Android development and Java are fairly different, knowing and remembering Java's structure is VERY beneficial. I will be following the book How to Think Like a Computer Scientist: JAVA Programming as I find that book very straightforward and helpful. If you would like to purchase the book, it's a good resource, but there is a free copy online: yhanks to Reddit user nydad for finding the free pdf of the book.
At the end of each Java lesson, I will post some sort of "challenge", as requested: some sort of problem for you to program on your own. If you would like to know how your solution did, feel free to email it to me (in the .java format; although runnable JARs would be more convenient, they make the server I use far more susceptible to loopholes and attacks, and therefore I won't open them).
With that, let's start up the setup procedure!
First off, there are many different IDEs you can use to develop with Java; however, since Eclipse and the Android Dev tools go so well together, we will be using Eclipse. Go ahead and download the Eclipse IDE for Java EE Developers from the link provided. Once downloaded, you will need to un-archive it (I'm on a Mac, I'm not sure about Windows), and simply place the folder in your Applications folder. To run, simply open the "Eclipse" icon in the "Eclipse" folder.
The first thing Eclipse will do is ask you for your workspace.
You will then be presented with a window, which is where the main of your work will take place.
In order to get started in writing a Java app, you would choose "File -> New -> Project" and then select "Java Project", but that will be for this weekend. For today, we'll simply set up the Eclipse settings, and then setup and add the Android SDK as well.
Next, you will need the Java JDK downloaded. Currently, the Java JDK is on version 6, and can be found here. If you have version 5, you can use it as well; there's no need to update to version 6. Unless you really know about what to download, simply clicking "Next -> Next -> Finish" should suffice just fine.
Next, you will need the Android SDK found at the link provided. Simply unpack and install it to a directory you will remember, as you will need it when we start adding things to Eclipse.
Next, open Eclipse back up, as we will be adding the Android information to Eclipse. In Eclipse, select "Help -> Install New SOftware" as shown:
The following window will appear.
Please select all the packages that appear, and hit "Next -> Next", accept the terms, and then click "Finish". This will begin downloading the Android Development Tools. This will go on in the background of Eclipse. Once it's done downloading, it will prompt you to restart Eclipse. Please do so. (If it tells you you are downloading unsigned content, please say that it's okay.)
Next, please navigate to where you installed/placed the Android SDK. There should be a file named "SDK Setup.exe. Please run it. When opened, a window with the different types of Android packages should open. PLease select only the android packages which you would like to use (I usually pick 1.6, 2.1, 2.2, 2.3, and 3.0) Please "Accept" the terms and click "Install". This will take quite a bit of time to install all of these, so please be patient.
We're almost done!
Now that the ADT is done being installed, we need to create a virtual device. In the SDK manager, find "Virtual Devices", as we must make a device for you to test your software on!
In the name field, Name it something meaningful; probably the target name, so you remember which version of Android. Next, pick a target; essenially, whatever version of Android you want to tinker with. Leave the rest as is, and click "Create AVD". Once that is done, make sure you hit "Start" to make sure that it works. It will be a lengthy startup, but you should eventually get a Home screen for a typical Android phone.
Next, we need to configure Eclipse one more time. In Eclipse, go to Eclipse -> Preferences (or on Windows, Window -> Preferences) and pick the Android tab. Where it says SDK Location, please find the location where you put the Android SDK, and click "Apply".
Then click "OK".
And that's it! You have successfully configured Eclipse and the Android SDK together so that you can develop for Android. This weekend, we will be starting the tutorial on Java, to give you all a refresher.
If you have any issues with your setup, please leave a comment here, or email me at email@example.com. If you place it here or email it to me, I will do my best to troubleshoot your problem at get back to you. Alternatively, you can post it at