Mac 下解压缩安装Android ndk bin 文件

1.解压缩

n Linux and Mac OS X (Darwin): Download the appropriate package from this page.

Open a terminal window.

Go to the directory to which you downloaded the package.

Run chmod a+x on the downloaded package.

Execute the package. For example:

  ndk$ chmod a+x android-ndk-r10c-darwin-x86_64.bin

  ndk$ ./android-ndk-r10c-darwin-x86_64.bin

The folder containing the NDK extracts itself. Note that you can also use a program like 7z to extract the package.

2.安装

1 . 下载NDK,地址:http://developer.android.com/tools/sdk/ndk/index.html
2 . 解压,解压得到的文件夹可以移动到其他文件夹,接下来把它的路径加入到环境变量里就行了
3 . 在Launchpad中打开terminal(终端
4 . 输入 vim ~/.bash_profile,回车
5 . 按英文键 i 进入编辑模式,在里面添加 export PATH=${PATH}:你的NDK路径
引用比如我是把NDK放在应用程序的adt-bundle-mac-x86_64文件夹中,所以输入:
        export PATH=${PATH}:/Applications/adt-bundle-mac-x86_64/android-ndk-r8e
6 . 按esc键退出编辑模式,输入:wq(冒号键+英文键w+英文键q),回车。
引用:w   表示 保存
:q    表示 退出
:wq 表示 保存并退出

7 . 输入source ~/.bash_profile,回车,以使前面的更改生效。

posted on 2015-01-21 15:54  kelisi_king  阅读(535)  评论(0编辑  收藏  举报