React Native项目编译通不过, 出现 The "android" command is deprecated.

错误提示:

*************************************************************************
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 "avd"

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

原因:
新版android sdk tool 舍弃了android相关命令,而cocos creator 依赖此编译,故通不过。

解决办法:
旧版sdk tool 覆盖即可,参考以下链接解决:
http://forum.cocos.com/t/creator1-4-1-android/45151

下载替换就可以了,mac下的路径是/Users/name/Library/Android/sdk

你可能感兴趣的:(React Native项目编译通不过, 出现 The "android" command is deprecated.)