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

查看:12
本文介绍了为什么“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 (form mac), https://dl.google.com/android/repository/tools_r25.2.3-windows.zip(适用于 windows).

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天全站免登陆