I downloaded the new build tools in Android Studio (21.0.1 as of Oct 21, 2014). I then deleted 20.0.0 that I had in SDK Manager. Then building in Android Studio failed saying it couldn't find 20.0.0. I thought I had deleted it. I then found it being referenced in my app module in build.gradle. I changed it, and then I built again, but it failed. I found a reference in the rest of my modules (4 of them to be exact). Any idea how to change the build tool version numbers everywhere? Can I just delete the build tools version number in all of my modules except my app module? It's my first time upgrading build tools while having Android Studio so I wanna make sure I don't mess anything up.
Asked
Active
Viewed 1.6k times
2
-
2Because it's a build tools version. It's not an api level. If you want to be mean about it... do you keep build tools 17, 18.01, 18.1, 18.1.1, 19, 19.0.1, 19.0.2, 19.0.3, 19.1, 20, 21, 21.0.1 all installed? This question is still totally relevant. – EGHDK Oct 21 '14 at 15:50
-
1As a matter of fact I do. Reason? There might always be a very critical bug that prevents you from building and you need to roll back. As a matter of fact: I have API 3 as well. Why should I even bother to delete the old ones? I mean the space on the hdd they take is barely noticeable these days and thus I literally don't care and don't want to care. – WarrenFaith Oct 21 '14 at 15:57
-
@EGHDK: I haven't done this yet, but one of the recipes at http://stackoverflow.com/questions/20404476/how-to-define-common-android-properties-for-all-modules-using-gradle should help. – CommonsWare Oct 21 '14 at 17:01
-
5@WarrenFaith: "I mean the space on the hdd they take is barely noticeable these days" -- please do not assume that everyone has copious amounts of disk space. In an ideal world, everyone would have room for all of this stuff. In an ideal world, I'd have hair. There are many developers who, for one reason or another, lack the disk space, whether they be solo developers or engineers at multi-billion-dollar companies. – CommonsWare Oct 21 '14 at 17:04
-
Thanks for the answer by Xav. I have tried that recipe exactly (for compilesdkversion instead of build tools version and it doesn't work) I think its because I don't know where project.ext should go if my root already has a build.gradle I will keep working with the answers in that question. – EGHDK Oct 21 '14 at 17:14
1 Answers
4
Solution 1 : Install the v 20 build tools.
Solution 2 : Change all build.gradle
in your modules to build with v 21.

TooCool
- 10,598
- 15
- 60
- 85