简体   繁体   English

如何指定较早的构建工具

[英]How to specify earlier Build Tools

When building from the command line, you usually need to use an earlier Build Tools, like 18.1.1. 从命令行进行构建时,通常需要使用早期的构建工具,例如18.1.1。

It builds fine when that is the "latest" you have installed, but if you have 19.1.0 and try to build, even with 当您安装的是“最新”版本时,它可以很好地构建,但是如果您具有19.1.0并尝试构建,即使使用

sdk.buildtools=18.1.1

added to your project.properties, it still complains: 添加到您的project.properties中,它仍然抱怨:

The SDK Build Tools revision (18.1.1) is too low for project 'Xxx'. Minimum required is 19.1.0

Is there any other setting that I can make/change to get it to use 18.1.1 without uninstalling 19.1.0? 我是否可以进行其他任何设置/更改以使其使用18.1.1而不卸载19.1.0?

In the main build.xml I see: 在主要的build.xml文件中,我看到:

${android.build.tools.dir}

But I can't find where it's defined. 但是我找不到它的定义位置。

Thanks! 谢谢!

So anyway the answer is -- Android SDK Manager does not install new version of Build Tools but does automatically suggest updating other tools. 所以无论如何答案是-Android SDK Manager不会安装新版本的Build Tools,但会自动建议您更新其他工具。 So when you see above do this: 因此,当您在上方看到时,请执行以下操作:

  1. Open "Android SDK Manager". 打开“ Android SDK Manager”。
  2. Tick latest version of the "Android SDK Build-tools". 勾选“ Android SDK Build-tools”的最新版本。
  3. Install packages... 安装软件包...

And you're done. 这样就完成了。 Build should just work with restart. 构建应与重新启动一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM