[java] Failed to import new Gradle project: failed to find Build Tools revision *.0.0

When I boot up Android Studio and select "New Project..." and go through creating a new project, I get this popup error:

Failed to import new Gradle project: failed to find Build Tools revision 17.0.0

Consult IDE log for more details (Help | Show Log)

I would love to consult the IDE log, but I haven't even managed to get into the application to do much of anything. I've went through the preferences multiple times to see if I can set a path for the Build Tools, but I can't find much of anything. How do I fix this, or how do I get into the application without opening a project so I can at least see the logs?

This question is related to java android gradle android-studio

The answer is


Uninstall the Android SDK Tools and then reinstall them from Tools > SDK Manager.

Screenshot of how to uninstall SDK Tools


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

A screenshot from Android Studio

A screenshot from Android Studio

You just have to click on it and the system will download to the build version required to run the project.


I had the API 17 installed but that was not enough. What I really need installed is the "Android SDK Build-Tools 17".

You can locate your "Android SDK Build-Tools X" inside the first child, named "Tools", in the "Android SDK Manager".


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!


Try to run gradle at the command line first. It might prompt you to setup and environment variable:

export _JAVA_OPTIONS="-Xms256m -Xmx1024m"

Read more here: 1, 2


Further make sure that the Android SDK build tools (adb, aapt, dx, dx.jar) are available in the PATH. If not you can create symlinks at the appropriate locations. They changed with the release of new SDK versions. Here is a shell script which creates the symlinks within the $ANDROID_HOME folder for you.


As of May 2020, A really straightforward solution using Android Studio:

  1. Open Android Studio
  2. From the top, choose File > Settings > Appearance & Behavior > System Settings > Android SDK
  3. click on the tab SDK Tools at the top. Then highlight Android SDK Build Tools from the list.
  4. Check "Show Package Details" check box, choose the build tools version you need and then click Apply.

Basically error saying your are missing "Android SDK Build-tools" installed.


I had this problem recently, my project didn't include local.properties file.

Check local.properties file if it includes sdk.dir with correct path to sdk


i think you can download the latest android SDK and use it.i do this and fixed the problem and work well. here is the link: http://developer.android.com/sdk/index.html#download


This worked for me after i tryed many solutions:
For some reason the adb process didn't restart itself after installing new packages. Manualy killing adb.exe and attempt to import the project another time solved this problem for me.


This is what I had to do:

  1. Install the latest Android SDK Manager (22.0.1)
  2. Install Gradle (1.6)
  3. Update my environment variables:
    • ANDROID_HOME=C:\...\android-sdk
    • GRADLE_HOME=C:\...\gradle-1.6
  4. Update/dobblecheck my PATH variable:
    • PATH=...;%GRADLE_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
  5. Start Android SDK Manager and download necessary SDK API's

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 buildToolsVersions 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"
   // ...

}

in your Project perspective, look for Application --> build.gradle and edit this lines

android { compileSdkVersion "android-N" buildToolsVersion "24.0.0 rc1"

like this:

android { compileSdkVersion 24 buildToolsVersion "23.0.3"


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to gradle

Gradle - Move a folder from ABC to XYZ A failure occurred while executing com.android.build.gradle.internal.tasks Gradle: Could not determine java version from '11.0.2' Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0 Failed to resolve: com.android.support:appcompat-v7:28.0 Failed to resolve: com.google.firebase:firebase-core:16.0.1 com.google.android.gms:play-services-measurement-base is being requested by various other libraries java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0)

Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK