未能导入新的 Gradle 项目: 未能找到 Build Tools 修订版 * .0.0

当我启动 Android Studio 并选择“ New Project...”并创建一个新项目时,我会看到这个弹出错误:

未能导入新的 Gradle 项目: 未能找到 Build Tools 修订版17.0.0

有关详细信息,请参阅 IDE 日志(帮助 | 显示日志)

我很想查阅 IDE 日志,但我甚至还没有设法进入应用程序来做很多事情。我已经多次查看了这些首选项,看看是否可以为构建工具设置一个路径,但是我找不到太多的东西。如何修复这个问题,或者如何在不打开项目的情况下进入应用程序,以便至少可以看到日志?

139728 次浏览

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.

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 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

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.

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!

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

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

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

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"

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.

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

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.

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

Screenshot of how to uninstall SDK Tools