NDK 环境搭建注意要点

本人参考文章:http://hualang.iteye.com/blog/1135105 来进行ndk环境搭建的,

对于Cygwin的安装,可以参考:http://blog.csdn.net/nxh_love/article/details/6609394这篇文章

总结出其中的要点:

1、修改C:\cygwin\etc\skel\.bash_profile文件,添加如下语句:

      

NDK=/cygdrive/e/android/android-ndk-r6b
export NDK  
并把它拷贝到C:\cygwin\home\nxh 覆盖原有的文件

然后重新打开cygwin

2、ndk 命令前都要有$NDK

   如:$NDK/ndk-build

NDK 环境搭建注意要点_第1张图片

3、常用的命令(官方文档)

ndk-build                  --> rebuild required machine code.
  ndk-build clean            --> clean all generated binaries.

  ndk-build NDK_DEBUG=1      --> generate debuggable native code.

  ndk-build V=1              --> launch build, displaying build commands.

  ndk-build -B               --> force a complete rebuild.

  ndk-build -B V=1           --> force a complete rebuild and display build
                                 commands.

  ndk-build NDK_LOG=1        --> display internal NDK log messages
                                 (used for debugging the NDK itself).

  ndk-build NDK_DEBUG=1      --> force a debuggable build (see below)
  ndk-build NDK_DEBUG=0      --> force a release build (see below)

  ndk-build NDK_APP_APPLICATION_MK=<file>
    --> rebuild, using a specific Application.mk pointed to by
        the NDK_APP_APPLICATION_MK command-line variable.

  ndk-build -C <project>     --> build the native code for the project
                                 path located at <project>. Useful if you
                                 don't want to 'cd' to it in your terminal.

你可能感兴趣的:(NDK 环境搭建注意要点)