Home  >  Article  >  php教程  >  mac下配置NDK开发环境

mac下配置NDK开发环境

WBOY
WBOYOriginal
2016-06-13 10:56:37940browse

本文参考了别人的文章,详细步骤:

一、启动终端Terminal

二、输入  pico .bash_profile  回车。

三、输入以下内容【路径依实情而定】:

[php]
export ANDROID_SDK_ROOT=/Users/apple/Desktop/adt-bundle/sdk 
export ANDROID_NDK_ROOT=/Users/apple/Documents/Android/android-ndk-r8e 
export PATH=$PATH:$ANDROID_SDK_ROOT 
export PATH=$PATH:$ANDROID_NDK_ROOT 
export ANDROID_TOOL=/Users/apple/Desktop/adt-bundle/sdk/platform-tools 
export PAHT=$PATH:$ANDROID_TOOL 

export ANDROID_SDK_ROOT=/Users/apple/Desktop/adt-bundle/sdk
export ANDROID_NDK_ROOT=/Users/apple/Documents/Android/android-ndk-r8e
export PATH=$PATH:$ANDROID_SDK_ROOT
export PATH=$PATH:$ANDROID_NDK_ROOT
export ANDROID_TOOL=/Users/apple/Desktop/adt-bundle/sdk/platform-tools
export PAHT=$PATH:$ANDROID_TOOL

 

四、 注意路径最好不要有空格!输入完成之后,Control+x  进行保存,然后提示是否保存,输入 y  ,最后回车即可!


五、检验路径步骤:关闭你的“终端”,重新打开,如果之前路径配置有问题,那么重新打开的“终端”将出现如下提示:-bash: exoort: command not found    如果没有此类提示,OK说明路径配置完成!

六、输入ndk-build,有反应说明配置路径成功。

七、cd 到要编译的项目内,ndk-build,编译成功。OK,搞定之。


 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn