How to install the build tools on android, because when creating a new android project I get this error:
Currently I validate if I had it installed but I get it as if the correct version is installed.
It seems that by default, Gradle is configured to use that version of the Build Tools.
If you already have a newer version, you can configure your project to use that version, putting buildToolsVersion "*.*.*"
in the build.gradle file of your project, in defaultConfig
.
From the Project view in Android Studio, look for the build.config inside the app folder:
In that file, add the line that I mentioned above with the version of the tools you have installed. In my case it is 27.0.1:
Once the line is added, at the top it will tell you that you have to reload the Build Gradle, so press Sync Now:
Afterwards, it should already be working :) Unfortunately, you should do this in all your new projects. If I find a way to configure gradle to use a certain version by default, I will add it here.