Cocos2d-x IOS port android

Source: Internet
Author: User
1. Create an cocos2d-x Android project:  Run the cocos2d-x in the create-android-project.sh SDK; // note that you first need to open this shell file, make sure that the first two lines of ndk are consistent with the path of the SDK and the local machine, the cocos2d-x itself does not automatically detect  Or copy the created hellocpp in the sample and use
2. Check whether the project is running. You Need To build_native.sh first and set ndk_root. For example: Export ndk_root = "/usr/mylib/Android-ndk" ./Build_native.sh
This will build native code
3. Put all related classes in IOS into the class in the created Project 4. Put all the resources in IOS into the resource of the created Project. 5. Modify Android. mk under proj. Android/JNI and add the new CPP file to local_src_files.  *To add all files in the directory:
Src_file_list: = $ (wildcard $ (local_path)/.../../classes/*. cpp) Local_src_files: = hellocpp/Main. cpp \  $ (Src_file_list: $ (local_path)/% = %)
6. build_native again.


Then... You can run it.
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.