Time for action – compiling and deploying San Angeles sample
Let's use Android SDK and NDK tools to build a working APK:
- Open a command-line prompt and go to the San Angeles sample directory inside the Android NDK. All further steps have to be performed from this directory.
Generate San Angeles project files with the
android
command:cd $ANDROID_NDK/samples/san-angeles android update project -p ./
Tip
You may get the following error upon executing this command:
Error: The project either has no target set or the target is invalid. Please provide a --target to the 'android update' command.
This means that you have not installed all the Android SDK platforms as specified in Chapter 1, Setting Up Your Environment. In which case, either install them using the
Android manager tool
or specify your own project target, for example,android update project --target 18 -p ./
. - Compile San Angeles native library with
ndk-build
: - Build and package San Angeles application in Debug mode:
ant...