Search code examples
androidcocos2d-x

How to create a new Android project with Cocos2d-x


I'm a newbie in Cocos2d-x. I read instruction to build samples and did successfully. However, I want to create my own project which can be able to run on Android. Can you give me a detail tutorial such as how to create project, how to implement classes, resources, etc.

In addition,I'm developing in Windows 7, so I can't setup X-Code like this tutorial. Are there any other solutions?

http://www.raywenderlich.com/33752/cocos2d-x-tutorial-for-ios-and-android-space-game

Thank you so much


Solution

  • I have answer the similar question here.

    Following step can create multi-platform project,include Android:

    1. Install python 2.7
    2. Open command line in Windows
    3. Go to your cocos2d-x-2.1.5\tools\project-creator folder
    4. Run create_project.py. Usage:

    create_project.py -project YourProjectName -package com.example.PakcageName -language cpp

    -language option:[cpp | lua | javascript]

    Your project will be created in cocos2d-x-2.1.5\projects

    Then find the proj.android , and import into Eclipse.