NDK 环境配置 (Ubuntu)

来源:互联网 发布:ant build linux命令 编辑:程序博客网 时间:2024/05/19 04:05

转载清注明出处 http://blog.csdn.net/cghs123


1.下载NDK 环境

http://dl.google.com/android/ndk/android-ndk-r7-linux-x86.tar.bz2


2.ubuntu 下环境配置
将包解压到某一路径下。

比如:/home/cghs/workspaces/


然后
sudo gedit /etc/environment

在PATH中 加入 :/home/cghs/workspaces/android-ndk-r7/   这个也就是你解压的路径。


之后运行
source /etc/environment/


最后 运行

ndk-build 


出现如下错误 表示环境搭建成功。
Android NDK: Could not find application project directory !    
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.    
/home/braincol/workspace/android/android-ndk-r5/build/core/build-local.mk:85: *** Android NDK: Aborting . Stop.