6

If i have two or more version of android sdk build tools as shown below then when which one will be chosen by the eclipse while building. IS it anything to with the SDK platform chosen for developing apk.enter image description here

Here which one will be used either 17 or 19?

Stephen Docy
  • 4,738
  • 7
  • 18
  • 31
Nikhil Kumar
  • 2,618
  • 3
  • 21
  • 24

2 Answers2

15

The build tools specifies the toolchain used to build Android projects. In Eclipse you can change which version is used with the project.properties file by specifying sdk.buildtools, e.g.

sdk.buildtools=17.0.0

You will probably never need to do that, as it will use the most recent installed version by default. It is not tightly coupled to the SDK version, and has only been recently split apart from the SDK itself (since version 17).

Dave
  • 4,282
  • 2
  • 19
  • 24
  • What is the difference between Build tools and SDK platform the? – Nikhil Kumar Feb 14 '14 at 12:32
  • 1
    In sdk why dont they provide Build tools with every version like system image, sdk platform then? – Nikhil Kumar Feb 14 '14 at 12:33
  • can u tell me the location of that project.properties file. In package explorer one project.properties file is there but in that there is no such line. Instead its target=android-15 . This i think denotes the SDK platform version not sdk build tools version? – Nikhil Kumar Feb 14 '14 at 12:44
  • 1
    You are correct about the SDK line. The build tools line isn't necessary, but the project.properties file is just a file under the root directory of the project. It is used exclusively by Eclipse. – Dave Feb 14 '14 at 12:47
  • So it means android will by default choose highest available version for BUILD TOOLS. we cant change it. Thats Correct? – Nikhil Kumar Feb 14 '14 at 12:49
  • 1
    By default, it uses the highest. You can specify which version is used on a per-project basis in Eclipse with the project.properties file (or with the build.gradle file in AndroidStudio). I'm sure there's a way using Maven, also. If you want to change the default, I do not know of a way. – Dave Feb 14 '14 at 12:53
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/47505/discussion-between-nikhil-kumar-and-dave) – Nikhil Kumar Feb 14 '14 at 12:57
  • error: Unable to resolve sdk.buildtools property value 'XXX' – Utsav Gupta Sep 21 '16 at 07:15
6

If there are different versions for Android SDK Build Tools , By default eclipse uses the most recent version of the Android Build Tools.

But if your project requirement belongs to different version(may be older) , you can do this using following steps.

  1. In the root folder of your application project, find the project.properties file.
  2. Open the file and specify the Build Tools version by adding a build-tools property on a separate line:

e.g. sdk.buildtools =17.0.0

Jigar Shekh
  • 2,800
  • 6
  • 29
  • 54