cocos2d-x3.1.1 porting the Android process

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.