Why "cocos Compile -p Android" Gives "the Android Command Is No Longer Available." Error
Solution 1:
After some digging about what changes I made in my development environment, only thing I could think of is Android SDK tools. I updated it one day before I run this command. Also I found an open issue for that in Github : https://github.com/cocos2d/cocos2d-x/issues/17424 This is a known issue which is being handled and under progress. So temporary work around is to download the previous version of android SDK tools and replace it with updated one. SDK tools that was working before : 25.2.3 : https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip (form mac), https://dl.google.com/android/repository/tools_r25.2.3-windows.zip (for windows).
Solution 2:
Now not need to downgrade to previous Android SDK tools version. You can now use Android SDK Tools 25.3.x.
Here is the pull request for the same. https://github.com/cocos2d/cocos2d-console/pull/410
I deleted all content inside this cocos2d-x-3.14.1\tools\cocos2d-console folder then downloaded this module cocos2d-console and copied all content to cocos2d-x-3.14.1\tools\cocos2d-console folder.
then on console I run command
cocos compile -p android --android-studio--ap android-24
Build succeed.
Solution 3:
I also searched for a solution for this but it seems like downgrading to previous android SDK version is what you should do for now.
Post a Comment for "Why "cocos Compile -p Android" Gives "the Android Command Is No Longer Available." Error"