Android under cocos2d create HelloWorld Project

Source: Internet
Author: User

Recently in the construction of COCOS2D environment, the results of various problems, two people get a day to do a good environment! -_-!!

Avoid people may also encounter me this situation, so write an essay, let everyone also understand how to build it ~

1, environmental installation preparation

Download Tadp-xxxx-windows.exe,:https://developer.nvidia.com/tegra-android-development-pack

Praise the Nvidia Lei Feng practice, this installation package integrates all the tools, so that we do not need to download the installation, one-click installation, all done! Note When installing, remember to add Eclipse, default is not added.

2, COCOS2D project generation

D:\cocos2d-x-2.2.3\tools\project-creator\
Execution: Create_project.py-project cocos2dtest-package com.example.cocos2dtest-language CPP (requires installation of python2.7)
A cocos2dtest project will be generated in D:\cocos2d-x-2.2.3\projects\ after the compilation is successful.

3. Eclipse Add Project

Import this Android project: D:\cocos2d-x-2.2.3\projects\Cocos2dTest\proj.android

4. Add Project Reference File

Copy the org under D:\cocos2d-x-2.2.3\cocos2dx\platform\android\java\src\ to d:\cocos2d-x-2.2.3\projects\Cocos2dTest\. Proj.android\src\, you will get the following files in the function directory:
COM and org

5. Eclipse environment variable settings

The like Resources path Variables needs to add a file cocos2dx d:/cocos2d-x-2.2.3


C + + Build
Build command for Builder Settings:
D:\NVPACK\android-ndk-r10c\ndk-build.cmd "need to download NDK"
Environment adding COCOS2DX and Ndk_module_path
cocos2dxd:/cocos2d-x-2.2.3 "cocos2d Version number Path"
Ndk_module_pathd:/cocos2d-x-2.2.3;d:/cocos2d-x-2.2.3/cocos2dx/platform/third_party/android/prebuilt

6, Copy Assets directory file, save assets to d:\cocos2d-x-2.2.3\projects\Cocos2dTest\proj.android\

Now you can try to run your project! :)

Android under cocos2d create HelloWorld Project

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.