Installing the SDK

Appportunity

Build your own Android App Dev Empire

Get Instant Access

Now that you're almost ready to code, let's look at installing the Software Development Kit, or, as it's known in the programming world, the SDK.

If you're a nonprogrammer who is reading this chapter to educate yourself, let's talk about what an SDK is. It isn't much unlike this book. It is just a set of instructions on how to program for something, be it

If you're a nonprogrammer who is reading this chapter to educate yourself, let's talk about what an SDK is. It isn't much unlike this book. It is just a set of instructions on how to program for something, be it

Microsoft Word, Amazon's website,or your phone.An SDK contains tools, descriptions of the programming commands used to communicate with the system, and lots of purely technical and, if you're not ready for it, completely confusing documentation.

On your computer, go to http://code.google.com/android/download.html.You should see something like Figure 12.1.

Figure 12.1

End-user license agreements creep up everywhere.

If you agree to the license, which you probably should if you want to program, put a check in the box that says you agree to the terms of the SDK license, and then click the Continue button.

At this point, simply download the SDK package that is applicable to your computer, be it Windows, Macintosh, or Linux.

Technically speaking, Windows Vista is supported, but we've had issues with getting the SDK applications to run properly on the 64-bit version of Vista. And there may not be a device driver for the phone, so you won't be able to debug the application either.A device driver will likely be available in the future, but no 64-bit driver currently exists.

Technically speaking, Windows Vista is supported, but we've had issues with getting the SDK applications to run properly on the 64-bit version of Vista. And there may not be a device driver for the phone, so you won't be able to debug the application either.A device driver will likely be available in the future, but no 64-bit driver currently exists.

Google gives you some instructions on how to install the SDK at http://code.google.com/ android/intro/installing.html.

As you can see there, you need to install an Integrated Development Environment (IDE), with Eclipse being the primary suggestion.Why Eclipse? That's what Google recommends as part of the installation procedure.

An IDE is a set of graphical tools that help you write software. Think of it as the difference between Notepad and Microsoft Word.You can write a letter in either, but Word gives you far more tools to make the letter prettier. Programming is like that.You can write software in a program like Notepad and then, using some tools, convert that text into a program that actually runs. Or you can use an IDE, where you can do everything all in one place.

An IDE is a set of graphical tools that help you write software. Think of it as the difference between Notepad and Microsoft Word.You can write a letter in either, but Word gives you far more tools to make the letter prettier. Programming is like that.You can write software in a program like Notepad and then, using some tools, convert that text into a program that actually runs. Or you can use an IDE, where you can do everything all in one place.

I recommend installing Eclipse from www.eclipse.org/downloads, unless you have a Java development environment you prefer.

After you've installed Eclipse and the optional plug-in—wait. Optional plug-in? How do you know if you need that? Let's start with how you know if you don't need it. If you won't be using Eclipse, you won't need the plug-in for it. Otherwise, the Android Development Tools plug-in would help you work directly with the Android SDK and make things work a little faster and easier as you develop for the phone. So, again, after you've installed Eclipse and the optional plug-in,start Eclipse. Then I recommend going through the Hello World tutorial. If you don't see the Tutorial icon, or if it doesn't look like Figure 12.2 (and you're running Eclipse 3.4), select Help, Welcome. You may also need to click the Restore Welcome link at the top of the page. If you're familiar enough with programming, this is a good tutorial for learning the interface and how to start.

Figure 12.2

Your Eclipse might look like this, or it might not. Software changes fast.

Figure 12.2

Your Eclipse might look like this, or it might not. Software changes fast.

If you're new to programming, I recommend checking out the websites and book I mentioned earlier.

After you've tried out the interface and tried the Hello World tutorial, my next recommendation is to head to http://code.google.com/android/intro/hello-android.html and walk through the Hello World example built especially for Android.

If you get the tutorial to work right, you'll see something like Figure 12.3.

Figure 12.3

Hello, Android!

Figure 12.3

Hello, Android!

Don't want to use Eclipse? That's fair enough.You can do everything with the SDK tools that you installed in the first place outside the IDE environment; it just isn't as easy. Software gets created in a text-based editor.You need to install a compiler to make the text you type actual software that will run on the phone. I stick with an IDE. But if you're feeling brave, I'd definitely start by taking a look at http://code.google.com/android/intro/tools.html to gain a deeper understanding of the SDK and the included tools.

Was this article helpful?

0 0

Post a comment