如何将Android Studio 2.3升级到构建工具25以修复"SDK Build Tools版本(21.1.2)对于项目来说太低了,最低要求为25.0.0". [英] How to upgrade Android Studio 2.3 to build tools 25 to fix "The SDK Build Tools revision (21.1.2) is too low for project Minimum required is 25.0.0"

查看:133
本文介绍了如何将Android Studio 2.3升级到构建工具25以修复"SDK Build Tools版本(21.1.2)对于项目来说太低了,最低要求为25.0.0".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该在哪个配置变量和值中设置升级到Build Tools 25.0.2的位置?遵循Android Studio消息后,我无法修复Gradle构建脚本以使Gradle感到满意.

Which configuration variables and values should I set where to upgrade to Build Tools 25.0.2? Following the Android Studio messages has not allowed me to fix my Gradle build scripts to Gradle's satisfaction.

应用程序在Android Studio 2.2中运行良好-重复构建和部署都很好.已将Android Studio升级到2.3,现在出现错误 SDK Build Tools版本(21.1.2)对于项目而言太低了.最低要求是"25.0.0"

Application working fine in Android Studio 2.2 - repeated builds and deployments were fine. Upgraded Android Studio to 2.3, now getting errors The SDK Build Tools revision (21.1.2) is too low for project Minimum required is "25.0.0"

我已按照消息"选项卡中的提示访问了该项目每个模块的 build.gradle ,并按指示向每个模块添加了 buildToolsVersion '25 .0.0',但这并不能解决问题,也没有更改为 buildToolsVersion '25 .0.2'.

I have followed the prompts in the Messages tab to the build.gradle of each module of the project and added buildToolsVersion '25.0.0' to each as directed, but this has not resolved the issue, and nor has changing to buildToolsVersion '25.0.2'.

我使缓存无效并重新同步了gradle;使缓存无效并重新启动Android Studio;并使缓存无效,停止Android Studio,在 rm -R 的各个 build 目录中运行文本搜索以查找"21".没有任何点击,并重新启动了我的笔记本电脑.没有运气.

I have invalidated the cache and re-synched gradle; invalidated the cache and restarted Android Studio; and invalidated the cache, stopped Android Studio, rm -R'd the various build directories, run a text search for "21." without any hits, and restarted my laptop. No luck.

(请注意,这与 https://github.com/ch-/android_core不同;在该问题中,Shyamnath Mallinathan试图找出如何继续使用Build Tools的23.0.3版本,而我试图找出如何升级到Build Tools的最新版本-25.0.2在我提出这个问题的时候)

(please note that this is not the same as https://github.com/c-h-/android_core; in that question Shyamnath Mallinathan is trying to find out how he can carry on using the 23.0.3 version of Build Tools, whereas I am trying to find out how to upgrade to the most recent version of Build Tools - 25.0.2 at the time I raised this)

推荐答案

感谢@Neji:-我通过

Thanks to @Neji :- I resolved this by

1)运行"渐变依赖项"以获取我的应用程序的依赖关系图

1) running "gradle dependencies" to get the dependency graph of my application

2)在所有模块的 build.gradle 文件和

2) setting buildToolsVersion '25.0.2' in all modules' build.gradle files and

3)将 compileSdkVersion 25和 buildToolsVersion '25 .0.2'添加到顶级 build.gradle

3) adding compileSdkVersion 25 and buildToolsVersion '25.0.2' to the top-level build.gradle

这篇关于如何将Android Studio 2.3升级到构建工具25以修复"SDK Build Tools版本(21.1.2)对于项目来说太低了,最低要求为25.0.0".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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