Game Development Reference
In-Depth Information
6.
Click Next. You'll be shown a dialog that lets you define your
application's icon. We'll keep everything as is, so just click Next.
7.
In the next dialog, you are asked whether you want to create a blank
activity. Accept this choice and move on by clicking Next.
8.
In the final dialog, you can modify some attributes of the blank
activity the wizard will create for you. We set the activity name to
“HelloWorldActivity� and the title to “Hello World.� Clicking Finish will
create your first Android project.
Note Setting the required minimum SDK version has some implications. The application can be
run only on devices with an Android version equal to or greater than the minimum SDK version you
specify. When a user browses Google Play via the Google Play application, only applications with
the appropriate minimum SDK version will be displayed.
Exploring the Project
In the Package Explorer, you should now see a project called “helloworld.� If you expand it and
all its children, you'll see something like Figure 2-6 . This is the general structure of most Android
projects. Let's explore it a little bit.
ï?® src/ contains all your Java source files. Notice that the package has the
same name as the one you specified in the Android project wizard.
ï?® gen/ contains Java source files generated by the Android build system. You
shouldn't modify them, as they get regenerated automatically.
ï?®
Android 4.1 tells us that we are building against an Android version 4.1 target.
This is actually a dependency in the form of a standard JAR file that holds the
classes of the Android 4.1 API.
ï?®
Android Dependencies shows us any support libraries our application links
to, again in form of JAR files. As game developers we are not concerned
with these.
ï?® assets/ is where you store files your application needs (such as
configuration files, audio files, and the like). These files get packaged with
your Android application.
ï?® bin/ holds the compiled code ready for deployment to a device or emulator.
As with the gen/ folder, we usually don't care what happens in this folder.
ï?® libs/ holds any additional JAR files that we want our application to depend
on. It also contains native shared libraries if our application uses C/C++ code.
We'll look into this in chapter 13.
ï?® res/ holds resources your application needs, such as icons, strings for
internationalization, and UI layouts defined via XML. Like assets, the
resources also get packaged with your application.
 
Search WWH ::




Custom Search