by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".
After spending a few hours: I restarted the Android SDK Manager
and at this time I noticed that I got Android SDK Platform-tools
(upgrade) and Android SDK Build-tools
(new).
After installing those, I was finally able to fully compile my project.
Note: The latest ADT (Version 22) should be installed.
As of May 2020, A really straightforward solution using Android Studio:
Look in the SDK Manager what is your highest Android SDK Build-tools
version, and copy this version number in your project build.gradle
file, in the android/buildToolsVersion
property (for me, version was "18.1.1").
Hope it help!
This is what I had to do:
ANDROID_HOME=C:\...\android-sdk
GRADLE_HOME=C:\...\gradle-1.6
PATH=...;%GRADLE_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
It happens because Build Tools revision x doesn't exist.
Today, the latest version is 23.0.2
(subject to change all the time).
The buildToolsVersion
s you want are included in the Android SDK, normally installed in the <sdk>/build-tools/<buildToolsVersion>
directory.
Don't confuse the Android SDK Tools with SDK Build Tools.
Change in your build.gradle
's buildToolsVersion
to some version installed in <sdk>/build-tools
android {
buildToolsVersion "23.0.2"
// ...
}
Whenever you will try to run a project with build tool version not present in studio, You will face this error.
As of now in 2017, It has been made really simple by Android Studio.
It will prompt you about this issue, along with something like this
You just have to click on it and the system will download to the build version required to run the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With