lolyoshi
lolyoshi

Reputation: 1546

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

Upvotes: 0

Views: 2256

Answers (3)

einverne
einverne

Reputation: 6682

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.

Upvotes: 1

lolyoshi
lolyoshi

Reputation: 1546

I found the solution. It includes these steps:

  1. Create new project by using create_project.py in ../tools/creator/
  2. Import the the new project to Eclipse
  3. Start to modify classes in Classes folder and change resource in Resources folder. They are all in NewProject folder.

At this time, I just develop by Notepad++ and use Eclipse to build. I'm finding a way to debug.

Upvotes: 0

Related Questions