Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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" [duplicate]

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.

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"

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'.

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.

(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)

like image 474
WillC Avatar asked Nov 09 '22 00:11

WillC


1 Answers

Thanks to @Neji :- I resolved this by

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

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

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

like image 71
WillC Avatar answered Nov 15 '22 08:11

WillC