Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocos2d-X doesn't find android platform

I'm using cocos2d-X v3 and I created a new cocos2d-X project following this tutorial.

But when I run

cocos run -s ~/MyCompany/MyGame -p android

I get this error:

building apk
Android platform not specified, searching a default one...
Can't find right android-platform for project : "/Users/filipeferminiano/MyCompany/MyGame/proj.android". The android-platform should be equal/larger than 10
like image 746
Filipe Ferminiano Avatar asked May 08 '14 19:05

Filipe Ferminiano


People also ask

Is Cocos2d cross-platform?

Cocos2d-x. Cocos2d-x is a mature open source cross-platform game development framework that supports 2D and 3D game creation. The engine provides rich functions such as graphics rendering, GUI, audio, network, physics, user input, etc., and is widely used in game development and interactive application construction.

How do I download Cocos2d-x?

To download Cocos2d-x, go to http://www.Cocos2d-x.org/download and download Version 2.2. 3 from the website. Once downloaded, you can unzip the Cocos2d-x-2.2.


1 Answers

How to specify the android platform:

Use '--ap 19|20', e.g.,

cocos run -s ~/MyCompany/MyGame -p android --ap 20

like image 57
James Avatar answered Sep 17 '22 21:09

James