Mac下关于The "android" command is deprecated.问题解决
来源:互联网 发布:海外淘宝首页 编辑:程序博客网 时间:2024/06/07 10:31
1.错误提示
近期在终端使用ant打包jar文件运行以下命令时,
$ android update project -p .
出现问题报错,错误如下
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 -p .”
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
2.搜索参考
在一番搜索后,终于解决了这个问题,参考链接如下
《Creator1.4.1 编译android出错一天了》
其中蓝色孤舟的回答解决了我的问题.
3.原因分析
(1).本人开发环境
先说一下本人在遇到这个问题时的开发环境
- macOS Sierra 10.12.5
- Android Studio 2.3
- SDK Tools 如下图
- Android SDK Build-Tools 26
- Android SDK Platform-Tools 26.0.0
- Android SDK Tools 26.0.2
(2).出现问题原因
在Android Studio官网的sdkmanager页面中,明确提到了在Android SDK Tools
25.2.3及以后提供了sdkmanager
command-line tools 以及舍弃android
命令.
4.解决方案
所以我们要想继续使用我们的anroid
命令,必须降低Android SDK Tools
版本,使用25.2.3以下版本.
我们可以参考蓝色孤舟的方式直接覆盖sdk
文件夹下的tools
文件夹
我使用Android Studio安装的SDK
路径如下
终端下打开我们的sdk
文件夹
$ open /Users/Story5/Library/Android/sdk
你会看到有tools
文件夹
下载提供的蓝色孤舟提供的低版本的tools
并覆盖我们自己的tools
文件夹
链接: https://pan.baidu.com/s/1kVMB3PP164 密码: kv82
为了防止其百度云盘地址失效,提供本人云盘存储,如下
http://pan.baidu.com/s/1b1IRwi
如果失效请联系本人.
QQ : 337995545
然后终端下继续执行android
命令.
$ android update project -p .
成功.
- Mac下关于The "android" command is deprecated.问题解决
- The "Android" command is deprecated.
- The "android" command is deprecated
- 【ubuntu】The "android" command is deprecated.
- The type ArrayDescriptor is deprecated问题解决方法
- cocos creator 编译通不过, 出现 The "android" command is deprecated.
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command
- Android开发: The type ClipboardManager is deprecated
- Android开发: The type ClipboardManager is deprecated
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command f
- Mac下关于MongoDb启动,停止
- Mac下关于pygame安装的问题
- the update-modules command is deprecated and should not be used
- NVL,NVL2,NULLIF有什么区别,及使用.
- salesforce学习资源合集
- 开发调研——如何在项目中实施敏捷开发scrum
- 命名空间 extern的用法 static全局变量
- 进程间关系
- Mac下关于The "android" command is deprecated.问题解决
- 0和5
- Android--初识Kotlin以及Android Studio3.0的新特性
- MySQL创建数据库与创建用户以及授权
- UWA助力独立游戏开发!《江湖X:汉家江湖》性能诊断精讲!
- 一文了解强化学习
- [集群搭建]记录使用docker搭建elasticsearch集群
- 【HTTPS服务器配置】----Nginx配置
- 母函数(在他人讲解的基础上添些自己的理解)