Game Development Reference
In-Depth Information
Introduction
This chapter explains how to install and conigure Android NDK on Microsoft Windows or
Ubuntu/Debian Linux, and how to build and run your irst application on an Android-based
device. We will learn how to set-up different compilers and toolchains that come with Android
NDK. In addition, we show how to setup the GCC toolchain for Windows to build your projects.
The rest of the chapter is devoted to cross-platform development using C++.
Installing Android development tools on
Windows
To start developing games for Android you will need some essential tools to be installed on
your system.
Getting ready
Here is the list of all the prerequisites you will need to start developing games for Android:
F Android SDK at http://developer.android.com/sdk/index.html .
This topic is based on the Android SDK rev. 22.3 and tested with Android
API Level 19.
F Android NDK at http://developer.android.com/tools/sdk/ndk/index.
html (we used Android NDK r9b).
F Apache Ant at http://ant.apache.org . This is a Java command-line tool which
may be unfamiliar to C++ developers. It's purpose is to build Java applications, and
since every Android application has a Java wrapper, this tool will help us to pack them
into archives ready for deployment (these are called .apk packages, which stands for
Android Package).
F Java SE Development Kit at http://www.oracle.com/technetwork/java/
javase/downloads/index.html .
Former versions of SDK/NDK for Windows required a Cygwin environment, a Linux-like
environment for Windows, to be installed. Up-to-date versions of these tools can run natively
on Windows without any intermediate layer. We will focus on the Cygwin-less environment and
will do all of the development without IDE. You heard it right, we will just use the command
line. All the examples in this topic were written and debugged on a Windows PC.
To compile native Windows applications presented in this topic, you will need a decent
C++ compiler, such as the MinGW package with a GCC toolchain. Using Microsoft Visual
Studio is also possible.
 
Search WWH ::




Custom Search