Game Development Reference
In-Depth Information
8.
Unpack the downloaded NDK .tgz ile:
>tar -xvf android-ndk-r9b-linux-x86_64.tar.bz2
9.
Set the NDK_ROOT environment variable to your Android NDK directory (for example,
~/android-ndk-r9b in our case):
>NDK_ROOT=/path/to/ndk
It is useful to put this line and the JAVA_HOME deinition to /etc/profile or /etc/
environment , if these settings are applicable to all the users of the system.
10. In case you are running a 64-bit system, you must ensure that you have the 32-bit
Java runtime installed also.
11. Run the following command to install the libraries. Failure to do so may lead to errors
with adb and aapt tools:
>sudo apt-get install ia32-libs
There's more...
There is a nice one-liner script that helps you automatically detect the OpenJDK home
directory. It essentially resolves the link /usr/bin/javac to the full path and returns the
directory part of the path.
JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
Creating an application template manually
First of all, we are going to create a basic template for our applications. Every Android
application that is to be built via Android SDK, should contain a predeined directory structure
and the coniguration .xml iles. This can be done using Android SDK tools and IDEs. In this
recipe, we will learn how to do it manually. We will use these iles later on as the very starting
point for all our examples.
 
Search WWH ::




Custom Search