-
GAME DEVELOPMENT TUTORIAL: DAY 4-2: Setting Up for Development
Welcome to Day 2 of the Android Game Development Unit. In today's lesson, we will setup everything we need to develop for Android!
Downloading the Files
To develop on Android, we need to make sure our computer has the following:
1. Java Development Kit
2. Eclipse
3. Android SDK
4. Eclipse ADT Plugin
Google has recently made it very easy to download items 2, 3, and 4 at once. If you already have Eclipse installed, you can opt for the "USE AN EXISTING IDE" option, but for ease and organization, I highly recommend that you just download the SDK ADT Bundle provided on the site below.
1. Go to this page (opens new window):
http://developer.android.com/sdk/index.html
2. Read the following conditions, agree to the terms, and select your operating system type.
1. Java Development Kit
2. Eclipse
3. Android SDK
4. Eclipse ADT Plugin
Google has recently made it very easy to download items 2, 3, and 4 at once. If you already have Eclipse installed, you can opt for the "USE AN EXISTING IDE" option, but for ease and organization, I highly recommend that you just download the SDK ADT Bundle provided on the site below.
1. Go to this page (opens new window):
http://developer.android.com/sdk/index.html
2. Read the following conditions, agree to the terms, and select your operating system type.
On Windows, you can find this by right clicking on Computer (or My Computer on older versions), and selecting Properties.
Once you press "Download the SDK ADT Bundle for Windows" it will begin to download the 399 MB file.
While your computer downloads that .zip file, let's talk about its contents!
While your computer downloads that .zip file, let's talk about its contents!
Contents of the SDK ADT Bundle
The file that you have downloaded includes the following:
1. Eclipse IDE
2. Android SDK
3. ADT Plugin for Eclipse
Since we are very familiar with Eclipse now, let's talk about the other two. Android SDK (software development kit) contains various tools and programs you need to develop on Android. It lets you download full Android verions (like Jelly Bean) that you can create an Emulator (or Virtual Device) with, and also contains various libraries that you can import from as you build on Android.
The ADT plugin acts as a bridge between the SDK and Eclipse. Once you install the ADT plugin to Eclipse, you will be able to access much of the Android SDK directly inside the Eclipse interface.
1. Eclipse IDE
2. Android SDK
3. ADT Plugin for Eclipse
Since we are very familiar with Eclipse now, let's talk about the other two. Android SDK (software development kit) contains various tools and programs you need to develop on Android. It lets you download full Android verions (like Jelly Bean) that you can create an Emulator (or Virtual Device) with, and also contains various libraries that you can import from as you build on Android.
The ADT plugin acts as a bridge between the SDK and Eclipse. Once you install the ADT plugin to Eclipse, you will be able to access much of the Android SDK directly inside the Eclipse interface.
THE JAVA DEVELOPMENT KIT
Android is based in Java. You will be writing Java code like you have in the previous units to build your apps and games. Android requires that you use the Java 1.6 compiler.
Java 7 is backward-compatible with Java 6 (1.6) so if you have that, you should be fine.
Let us first make sure that you have the correct version of Java installed.
1. Open up Eclipse (it can be any version. Does not have to be the one that you just downloaded).
2. Select Window >> Preferences >> Java >> Compiler, and make sure that you can select "Compiler compliance level" 1.6 as an option.
Java 7 is backward-compatible with Java 6 (1.6) so if you have that, you should be fine.
Let us first make sure that you have the correct version of Java installed.
1. Open up Eclipse (it can be any version. Does not have to be the one that you just downloaded).
2. Select Window >> Preferences >> Java >> Compiler, and make sure that you can select "Compiler compliance level" 1.6 as an option.
If you are unable to select 1.6, click on "Installed JREs" to the left. You should be able to see what version of the JRE you have.
As long as you have jre6 OR jre7, you should be fine. If you know that you have these installed but cannot see it, click Add and navigate to its path, and select its directory. It should then appear, and you should be able to go back to the Compiler option and select 1.6.
If you do not have any compatible JREs, install one below:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Selecting JDK 7 will be perfectly fine.
As long as you have jre6 OR jre7, you should be fine. If you know that you have these installed but cannot see it, click Add and navigate to its path, and select its directory. It should then appear, and you should be able to go back to the Compiler option and select 1.6.
If you do not have any compatible JREs, install one below:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Selecting JDK 7 will be perfectly fine.
Extracting the Files
Once your Android SDK ADT Bundle is finished, extract it to a directory of your choice. I personally like to place this in my Desktop, but it's up to you.
As I said, this Bundle contains its own Eclipse. It has a cool new icon, splash loading box, and a wealth of good information for developers.
1. Open up the directory you extracted the Bundle to, and go to the eclipse folder, and run eclipse.exe.
2. Select a workplace of your choice. I recommend creating a new workplace to separate your code from the previous Units.
3. By now, you should be able to see this welcome screen (much better looking than the original Eclipse welcome screen IMO).
As I said, this Bundle contains its own Eclipse. It has a cool new icon, splash loading box, and a wealth of good information for developers.
1. Open up the directory you extracted the Bundle to, and go to the eclipse folder, and run eclipse.exe.
2. Select a workplace of your choice. I recommend creating a new workplace to separate your code from the previous Units.
3. By now, you should be able to see this welcome screen (much better looking than the original Eclipse welcome screen IMO).
Just like in Unit 1, we will pick up from here in the next lesson.
I hope you guys are very excited about this Unit! I know I am. The whole purpose of the other three Units was to get you all ready for the fun stuff: Android game development. And finally, we are ready to begin.
I hope you guys are very excited about this Unit! I know I am. The whole purpose of the other three Units was to get you all ready for the fun stuff: Android game development. And finally, we are ready to begin.
Feel free to email me questions at jamescho7@kilobolt.com
|
|

No source code is available for this lesson.