There isn't any available platforms when use cocos compile -p android

Hi everyone,

Does anybody get error like me when try to build cocos android project on Mac as below:

There isn’t any available platforms cocos2dx

There are any solution to resolve this problem ?

Thanks

1 Like

add a file caled .cocos-project.json to your projects directory and have it contain, something like:
(note: version info might be different and probably don’t need “engine_type”:)

{
    "engine_type": "prebuilt",
    "engine_version": "cocos2d-x-3.8",
    "project_type": "cpp"
}

I just went through this and @nite provided me with this.

Thanks so much,
I found problem because i upgraded from 3.6 -> 3.8 with missing files.

For anyone having this problem: You have to go to your game directory (cd yourgame), you might be one level up too high. Sometimes the solution is simple.