如何从命令行查看 Android 开发者工具版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24447687/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:10:21  来源:igfitidea点击:

How to check the Android developer tools version from the command line?

androidcommand-lineadt

提问by Joan P.S

I'm trying to retrieve the ADT version to generate some system reports.

我正在尝试检索 ADT 版本以生成一些系统报告。

How can I check the version of the android developer tools installed on the system using the command line?

如何使用命令行检查系统上安装的 android 开发人员工具的版本?

回答by zmarties

Various parts of the tools save their revision number in files

工具的各个部分将其修订号保存在文件中

For example

例如

cat /android/sdk/platform-tools/source.properties | grep Pkg.Revision
cat /android/sdk/tools/source.properties | grep Pkg.Revision

The build tools themselves are placed in versioned directories, so you can find them via

构建工具本身放置在版本化目录中,因此您可以通过以下方式找到它们

ls /android/sdk/build-tools/