Impression Notes Link:
http://app.yinxiang.com/l/AAXeIjFsjjFAC68i6hUQkiwFFZg3Maz-AkA/
Cocos2d-x 3.1.1 Win transplant to Android
win:vs2012
android:eclipse+ndk-91, vs2012 project in the Proj.win32 folder inside the CPP and. h is the picture sound in the classes folder inside the Resources folder
2. First step: Import Eclipse path is *****+secondgame2\proj.android
3, the second step to change the android.mk in JNI to modify the compilation file to add a new CPP file note main.cpp do not add in because this main is Win32 main Android has its own entry activity
This time the Run application appears:
4, the third step set the NDK compiler environment variable right-click Project-"property-" C + + Build-"environment-" add
5, the fourth step to modify a location right-click the folder under the arrow pointing to enter the property
Enter property
The path is: G:\MICROSOFT\COCOS2D\COCOS2D-X-3.1.1\COCOS\PLATFORM\ANDROID\JAVA\SRC "Remember to modify your path prefix"
"Note" Androidmanifest modify this to become a tree vertical screen:android:screenorientation=
"Portrait"
6. Run application The following is the log of the console:
The CPP file that was just changed before was contacted by Androd Jni first to compile the CPP and C + + code with the NDK into a so file like a library to the Java layer to invoke
CPP files for engines
Compiled later in the CPP compilation section of this engine
The compilation process has a warning prompt:
7, Win32:
Android Ddms's
Reference Link: http://www.2cto.com/kf/201407/320684.html
cocos2d-x3.1.1 porting the Android process