abc
abc

Reputation: 2027

There are not available platforms

Im using cocos2d-x version 12 and NDKrc12 and I have all the paths in my .bash_profile set. But when I build for android and type:

cocos compile -p android

It displays a message "There are not available platforms" which can't be because I have the android SDK installed in the correct path what is wrong?

Upvotes: 2

Views: 1399

Answers (3)

alex zhou
alex zhou

Reputation: 1

cd your project root, then open .cocos_project.json, find "android_cfg" arg, if you have the folder. if you don't find, then create a new cocos project, cocos compile, then judge which platform can run, in new project folder open .cocos_project.json. You can look for diffences between them.

Upvotes: 0

David
David

Reputation: 1074

Run android on the command line, this will open the Android SDK manager. From here make sure that you have installed the appropriate SDK for your device.

Upvotes: 0

abc
abc

Reputation: 2027

On the latest version of cocos2d-x for some odd reason you need to use the '-s' option like this: cocos run -s /Users/me/myprojects/mygame -p android

Otherwise without '-s' it displays "there are not available platforms" seems unnecessary when your in your project folder but I guess it is!

Upvotes: 1

Related Questions