Installation steps:
1. Download The ndk package ,:
Http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip
2. Configure ndk
A. decompress the android-ndk-r4b-linux-x86.zip package.
I am creating a working directory/workspace/ndk
Store the compressed package in this directory,
$ Unzip android-ndk-r4b-linux-x86.zip
B and rename it. The name is too long and inconvenient.
$ MV android-ndk-r4b (ndkr4)
C sets environment variables for ndk-build
(For ease of use)
Modify Your. bashrc File
$ VI ~ /. Bashrc
Add at last
Export ndk_home =/workspace/ndk/ndkr4/
Export Path = $ path: $ ndk_home
Save and exit.
Make the settings take effect immediately
$ Source ~ /. Bashrc
Test whether to configure OK
$ Ndk-build
Ndk-build
Android ndk: cocould not find application project directory!
Android ndk: Please define the ndk_project_path variable to point to it.
/Workspace/ndk/ndkr4/build/CORE/build-local.mk: 85: *** Android ndk: aborting. Stop.
As long as it is not command not found, hahaha, you are successful.