There are pretty complete instructions for downloading the SDK in almost every Android reference, because you really can't begin software development without having most of the tools.
You'll notice that there are choices about what to download. I'll tell you what I've downloaded, but if you like another choice, feel free to take it.
I'd like you to prepare a journal describing your download experience (see end of this page) so at the very least you should take notes as you do the various steps.
The page to start from is http://developer.android.com/sdk/index.html.
This page has most of its important content hidden behind expandable headings. For example, if you click on the SYSTEM REQUIREMENTS heading, you'll see a list of operating systems and development tools supported for the Android SDK. If you don't have one of the listed operating systems, you might still succeed in getting the development tools to work, but you are committing yourself to extra work!
If you already have another version of Java on your system, and want to keep it, your life just got more complicated. There's no problem with keeping two versions of Java in separate directories, unless you actually want to use them both.
In Windows, there's a Java directory, using in Program Files, and all the downloaded versions sit inside that directory. To use a particular version, you need to make sure that the path is set correctly and that the environmental variables JAVA_HOME and CLASSPATH are set to match.
On linux, that scheme would work most of the time if it weren't a convention to put a soft link in /usr/bin/javac (and /usr/bin/java and /usr/bin/jar, etc.) to the current version. So you need to redo the soft link when you want to switch between versions. To make this easier, there's a tool called update-alternatives, which fixes the soft links if you follow a set of conventions about where you put the software, and since there are so many different java tools, there's a tool called update-java-alternatives which calls update-alternatives on about twenty different java tools if you have its configuration file set up correctly.
To be lazy, I'm going to assume that you're willing to have only one version of Java on your system; if you already have another, you'll leave the JRE around for programs you've previously compiled, but never use the JDK for that version again.
To download software from Oracle, you need an Oracle user account. Go to https://login.oracle.com/mysso/signon.jsp, and either sign in, or click on the Create Account button. The account is free, although presumably Oracle is hoping to send you advertising once you give them your email address.
To download JDK 6, you need to go to http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html You might as well download the latest version of Java 6, even though you are scores of versions behind the latest version of Java 8. That's Java SE Development Kit 6u45. After you click on the link, you'll have to choose the Accept License Agreement radio button, and the appropriate OS and hardware version.
If you are running a 64-bit Windows system (pretty likely if you bought your machine in the last three years) you want the Windows x64 download, jdk-6u45-windows-x64.exe. It is a self-installing executable, but you'll need an administrative password to install. I think it sets up the path, etc. so that all you have to do is run it.
Linux X64 has two files to pick from. If you were running redhat linux or one of its derivatives, you'd want the file with rmp in the name; I'm running ubuntu, and chose the other. The .bin extension indicates that the file is intended to be run as a shell script, so once you've downloaded it, you'd
chmod +x jdk-6u45-linux-x64.bin ./jdk-6u45-linux-x64.bin
If you have Windows on your machine, you will obviously want to download a Windows version of the software. If you happen to have a 32-bit processor, that is also relevant to your choice.
If you already have eclipse installed on your machine, you can save a little network traffic by downloading only the SDK. This would also be your choice if you are planning to skip using eclipse. The main advantage in doing so is that you understand exactly why a particular tool didn't get run -- you didn't run it. Eclipse tries not to do any duplicate work, and sometimes it doesn't do what you expect it to. On the other hand, eclipse is well connected to the documentation, and will save you a lot of search time.
A side-bar invites you to consider downloading Android Studio instead. It isn't a silly idea, but I decided not to do it.
The example code is on github, a public code repository. The URL is https://github.com/programmingandroid
You don't need to download any of their code for the course. Almost all of it is in the textbook. But it's instructive to read it anyway, it's interesting to compile and play with it, and you sometimes use it as skeleton to start your own systems.
Eclipse offers a number of different screen arrangements; here are some you may see:
![]() | ![]() | ![]() |
Because computersystemsartists.net is a domain name I control, android separates my android projects from others, and HelloWorld is the particular project. Because java gives special relationships to classes sharing the same package, you want your package name to be different from every other one, even other projects you may write later.net.computersystemsartists.android.helloworld
We'll change this to مرحبا
if we change it to bumble, or ﻡﺮﺤﺑا, we'll see those values reflected in the Graphical Layout panel of the editor. But the reason that Android allows for indirection (that is, using yet another file to hold the actual value) is so that all the user interface values are defined together. So, a better thing to do would be to change it in the res/values/string.xml file.
If you are testing the app on a phone, you can watch the progress of the software installation at the bottom of the eclipse screen. When it is installed, you can unlock the phone and see the app running.
If you are using the simulator, the process is exactly the same, except the simulator takes longer to run. Depending on which image you are running and the speed of your PC, you may have to wait several minutes while the simulator starts up. Even after eclipse claims the software is installed, the simulator is still working, and not yet ready to be unlocked. Just be patient.