Error while setting Android studio for cpp-tests in MAC

Hi,

I am getting error while running python android-build.py -p 22 cpp-tests. I am using COCOS2d-x 3.14.1 version and android studio 2.3.1 version on MAC.

And I stuck with this line, for more than 4 days. Till that line, all ran successfully.

I have followed the tutorials mentioned below.
http://cocos2d-x.org/docs/installation/Android-terminal/#os-x-linux-instructions

error message:
akhs-Mac-mini:build akh2$ python android-build.py -p 22 cpp-tests
cocos compile -p android -s /Users/akh2/_backup/cocos2d-x-3.14.1/build/…/tests/cpp-tests --ndk-mode debug --app-abi armeabi-v7a --ap android-22
Building mode: debug
Using Eclipse project : /Users/akh2/_backup/cocos2d-x-3.14.1/tests/cpp-tests/proj.android
running: ‘/Users/akh2/Library/Android/sdk/tools/android update project -t android-22 -p /Users/akh2/_backup/cocos2d-x-3.14.1/tests/cpp-tests/proj.android’


The “android” command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager


Invalid or unsupported command “update project -t android-22 -p /Users/akh2/_backup/cocos2d-x-3.14.1/tests/cpp-tests/proj.android”

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
Error running command, return code: 2.
Build dynamic library for project [ /Users/akh2/_backup/cocos2d-x-3.14.1/build/…/tests/cpp-tests ] failed!
akhs-Mac-mini:build akh2$

expecting solution for this.

1 Like

Hi, there is issue with new Android SDK - it’s now not supporting android comands :slight_smile: so cocos2d-x trying to execute not exisitng commands.

There seems is some guide how to avoid this:

Thanks for you reply.
After rolling back SDK it compiled successfully. (i.e ~/Library/Android/sdk/tools i replaced the tools folder with the previous version)