一、赋上最新版本的Android NDK下载链接
ndk_r12 (June 2016)
Windows 32-bit : http://dl.google.com/android/repository/android-ndk-r12b-windows-x86.zip
Windows 64-bit : http://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip
Mac OS X 64-bit : http://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip
Linux 64-bit (x86) : http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
二、下载对应的版本按照其下方式解压至你所要安装的目录
三、解压完之后我这里为了区分各个版本,方便管理,我重名为r12b,修改配置文件 /etc/profile
[root@localhost ndk]# gedit /etc/profile
添加命令:
export ANDROID_NDK_HOME=/usr/local/android/ndk/r12b
export PATH=$ANDROID_NDK_HOME:$PATH
关闭保存;使之生效:
[root@localhost ndk]# source /etc/profile
四、验证NDK,切换至ndk目录 执行编译命令
[root@localhost r12b]# ndk-build
显示为以上的表示安装成功,大功告成!