为什么"cocos compile -p android"给出"android命令不再可用".错误 [英] why "cocos compile -p android" gives "The android command is no longer available." error

查看:462
本文介绍了为什么"cocos compile -p android"给出"android命令不再可用".错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事cocos2d-x项目.我总是使用cocos命令cocos compile -p android --android-studio -m debug编译android项目. 但是现在此命令返回错误. android命令不再可用.

I am working on a cocos2d-x project. i always compile android project using cocos command cocos compile -p android --android-studio -m debug. But now this command returning an error. The android command is no longer available.

For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
Error running command, return code: 1.
Error running command, return code: 14.

我不知道问题所在.为什么这给了错误?我做了什么更改导致了此问题? 我正在使用Mac OS sierra,Cocos2d-x 3.14.1和Android Studio.

i can't figure out the problem. why this is giving error? what did i changed that caused this issue? I am working on Mac OS sierra, Cocos2d-x 3.14.1, Android Studio.

推荐答案

在对我在开发环境中进行的更改进行了深入研究之后,我唯一想到的就是Android SDK工具.我在运行此命令的前一天对其进行了更新.我还在Github中发现了一个开放的问题: https://github.com/cocos2d/cocos2d-x/issues/17424 这是一个已知问题,正在处理中并且正在处理中. 因此,临时的解决方法是下载早期版本的android SDK工具,然后将其替换为更新的工具. 在此之前可用的SDK工具:25.2.3: https://dl. google.com/android/repository/tools_r25.2.3-macosx.zip (适用于Mac),

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).

这篇关于为什么"cocos compile -p android"给出"android命令不再可用".错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆