The most clear ndk Compilation Method in history
Many android Developers may have tried ndk compilation, But how troublesome it is to build an environment under windows is, I must have understood it. Today I will record the simplest method I have studied.
1. First download and install ndkCompiling environment
Http://gl.paea.cn/contents/6c5aa5daf49d3daa.html
The integrated cocos2dx development environment of the redbaby toolbox is installed. After installation, configure the path in the advanced computer environment configuration to be better than my ndk path D: \ cocos2dx64 \ NDK
2. Create an android demo
The source code demo will be attached later.
Resource address: http://download.csdn.net/detail/jgszhuzhu/8044193
3. Enter D: \ cocos2dx64 \ cygwin to open the Cygwin. bat file, and cd to enter the project directory, for example, C:/Users/Administrator/Desktop/jnidemo/JNITest. Note that the backslash is different from the windows Command.
You can run the "ls" command to check whether the entered information is correct. Then you can run the "ndk-build" command to compile it. You can see that the so file is generated in the armeabi file under lib.