Android porting process with cocos2d-x3.1.1
Evernote link:
Http://app.yinxiang.com/l/AAXeIjFsjjFAC68i6hUQkiwFFZg3Maz-AkA/
Cocos2d-x 3.1.1 win porting to android
Win: vs2012
Android: eclipse and ndk-91. For vs2012 projects, the cpp and. h In the proj. win32 folder are the image sounds in the Classes folder.
2. Step 1: import the eclipse path ***** + SecondGame2proj. android
3. Step 2: Change android. mk in jni to modify the compilation file and add the new cpp file. Note that main. cpp does not need to be added because this main is win32 main. android has its own portal activity.
At this time, run application appears:
4. in step 3, right-click the environment variable for ndk compilation and choose Project> property> c/c ++ build> environment> add
5. In Step 4, right-click a position and right-click the folder pointed by the Arrow below to enter the property
Enter property
PATH is: G: microsoftcocos2dcocos2d-x-3.1.1cocosplatformandroidjavasrc [remember to modify your path prefix]
[Note] android: screenOrientation =
Portrait
6. run application:
The modified cpp file has been used by jni of androd before. Compile cpp, that is, c ++ code, into an so file using ndk, and call it for the java layer like a library.
Cpp file of the engine
Later compilation takes a long time in the cpp Compilation part of this engine
Warning during compilation:
7. win32:
Android DDMS