-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Android NDK Game Development Cookbook
By :
Installation of the basic tools on Linux is as easy as it was with their Windows counterpart. In this recipe, we will see how to install the basic Android development tools on *nix systems.
We assume you already have an Ubuntu/Debian system with the apt package manager. Refer to http://wiki.debian.org/Apt for details.
Carry out the following steps to install the required basic tools:
>sudo apt-get update
>sudo apt-get install openjdk-6-jdk
>sudo apt-get install ant
>wget http://dl.google.com/android/android-sdk_r22.2.1-linux.tgz
tgz file (the actual version might vary, 22.2.1 is the latest version as of October 2013):>tar -xvf android-sdk_r22.2.1-linux.tgz
~/<sdk>/tools/android to install the latest Platform Tools and all of the SDKs—just like in the Windows case.Failure to do so will result in an error while trying to use the Ant tool when building any application for the Android.
>wget http://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64.tar.bz2
.tgz file:>tar -xvf android-ndk-r9b-linux-x86_64.tar.bz2
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 definition to /etc/profile or /etc/environment, if these settings are applicable to all the users of the system.
adb and aapt tools:>sudo apt-get install ia32-libs
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::")
Change the font size
Change margin width
Change background colour