1、Windows环境变量设置: CYGWIN=nodosfilewarning CYGWIN_PATH=C:/cygwin/bin NDK_ROOT=C:/AndroidSDK/android-ndk-r5b 2、Eclipse下项目属性设置: include路径: ${NDK_ROOT}/toolchains/arm-eabi-4.4.0/prebuilt/windows/lib/gcc/arm-eabi/4.4.0/include-fixed ${NDK_ROOT}/toolchains/arm-eabi-4.4.0/prebuilt/windows/lib/gcc/arm-eabi/4.4.0/include ${NDK_ROOT}/platforms/android-9/arch-arm/usr/include C/C++ Build/Builder Setting/Build command: ${CYGWIN_PATH}/bash.exe --login -c "cd ${ProjDirPath} && ${NDK_ROOT}/ndk-build" 【Android SDK/NDK混编开发环境变量设置】或者: C:/cygwin/bin/bash.exe --login -c "cd /cygdrive/d/Workspace/Android/hello-jni && /cygdrive/c/AndroidSDK/android-ndk-r5b/ndk-build" (这个不如上一个方法,每个项目都要修改成对应路径) 3、Cygwin下环境变量设置: ANDROID_NDK_ROOT=/cygdrive/c/AndroidSDK/android-ndk-r5b export ANDROID_NDK_ROOT export PATH=$ANDROID_NDK_ROOT:$PATH 其他参考文献: 1、http://codemaemo.appforce.org/2010/07/tutorial-using-eclipse-for-ndk-projects/ 2、http://www.experts-exchange.com/Programming/Editors_IDEs/Java/Eclipse/A_4125-Building-Android-app-with-NDK-integrated-in-Eclipse-with-CDT.html 3、http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on |