第一步,下載安裝cygwin,(模擬Linux 的編譯環境),咱們能夠到Cygwin的官方網站下載Cygwin的安裝程序,地址是: http://www.cygwin.com/ ;html
開始安裝Cygwin,安裝教程http://jingyan.baidu.com/article/48a42057accae3a92525045a.htmlandroid
第二部,下載ndk,http://developer.android.com/tools/sdk/ndk/index.html;下載完成,解壓;shell
第三步,在Cygwin的安裝目錄的etc的文件夾下,找到profile的文件:windows
在profile中配置ndk的環境變量:
ide
# Setup some default paths. Note that this order will allow user installed網站
# software to override 'system' software.ui
# Modifying these default path settings can be done in different ways.this
# To learn more about startup files, refer to your shell's man page.spa
PATH="/usr/local/bin:/usr/bin:/cygdrive/e/Android/Android_softWare_tools/NDK/android-ndk64-r10-windows-x86_64/android-ndk-r10:orm
${PATH}"
MANPATH="/usr/local/man:/usr/share/man:/usr/man:${MANPATH}"
INFOPATH="/usr/local/info:/usr/share/info:/usr/info:${INFOPATH}"
# Set the user id
USER="$(id -un)"
# TMP and TEMP as defined in the Windows environment must be kept
重啓Cygwin,而後執行ndk-build:
若是出現以下信息表示配置成功: