unbuntu install ndk 安装ndk

先到想要的路径

cd /opt

从谷歌官方下载工具压缩包

wget -c https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip

安装解压软件,ubuntu默认没有

sudo apt-get install fastjar

解压到当前路径

sudo jar xvf android-ndk-r11c-linux-x86_64.zip

设置环境变量

export NDK_ROOT=/opt/android-ndk-r11c

测试运行

root@ubuntu:/opt/android-ndk-r11c$ ndk-build -v

bash: /opt/android-ndk-r11c/ndk-build: Permission denied

更改权限

root@ubuntu:/opt# chmod a+x -R android-ndk-r11c

root@ubuntu:/opt/android-ndk-r11c$ ndk-build -v

GNU Make 4.1

Built for x86_64-pc-linux-gnu

Copyright (C) 1988-2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

完成,可以使用

你可能感兴趣的:(unbuntu install ndk 安装ndk)