In a few steps:
1. Installing Cygwin
2. Configure NDK Environment variables
3. Using the NDK to compile the program <---here Wakao becomes the *.so file, then the NDK development environment is well-equipped
4.
1. Installing Cygwin
Download Package Cygwin2.738.zip Http://dl8.cr173.com/soft1/cygwin2.738.zip
Note When installing cygwin2.738, note the point, reference: http://blog.csdn.net/zhangrongde/article/details/9372487
To check if the installation was successful: Cygcheck-c Cygwin
2. Configure NDK Environment variables
Reference: http://www.cnblogs.com/jdksummer/articles/2166057.html
First of all, my nkd directory, D:\ndkr10
Next, my Cygwin directory, D:\cygwin, contains a directory, cygdrive
Open cygwin\home\administrator\.bash_profile, add NDK variables,
ndk=/cygdrive/d/ndkr10
Export Ndkhome
Note: ndkhome name any
Open Cygwin, enter the CD $NDK, if the output
Indicates that the environment variable is set successfully.
3. Using the NDK to compile the program
Reference: http://www.cnblogs.com/jdksummer/articles/2166057.html
Open Cygwin, enter $NDK/ndk-build
Find compilation warning, check
To change the example teapot, make sure that the program under which you are compiling () Androidmanifest.xml has a version number greater than
<uses-SDK android:minsdkversion="one" android: Targetsdkversion=" />" ...
Enter $NDK/ndk-build, recompile, go to D:\ndkr10\samples\Teapot\libs\armeabi-v7a
Libteapotnativeactivity.so
Here, the NDK environment is well-equipped.
Construction of the Android JNI development environment