1. Configure NDK Path settings
You can modify it via vim in Cygwin, or you can modify home\< your user name >\.bash_profile file in the Windows installation directory to add the environment variable last
Ndk=/cygdrive/e/andriod/develop/android-ndk-r4
Export path= $PATH: $NDK
Which ndk=/cygdrive/< your drive letter >/<android ndk directory >, "NDK" the name casually up, often used not too long.
Restart Cygwin, enter:
CD $NDK
You can enter the NDK corresponding directory description settings OK.
2. JNI Compilation Environment Configuration
Project Right-click the building settings in the point properties->c/c++ build to remove the Use default Build command and enter ${ndkroot}/ndk-build.cmd
Click on environment in the C + + build, click Add ... Add the environment variable ndkroot, the value of the NDK root directory E:\android\develop\android-ndk-r10d
3. The following message appears:
Multiple markers at the
-Syntax Error
-Type ' jnienv ' could not being resolved
-Type ' Jnicall ' could not being resolved
This is due to the fact that the jni.h is not imported, and this file is under the NDK directory. So, refer to the following steps:
Project Properties, C + + general-Path and Symbols
Select the include tag, ADD-E:\android_sw\android-ndk-r10d\platforms\android-19\arch-arm\usr\include
and select all languages. Finally, apply---OK so the error is resolved.
4. Error: Program ' sh ' not found in PATH
The C:\cygwin64\bin directory is added to the PATH environment variable of the Win7 system.
Eclipse Environment NDK Issues Summary