[android] AndroidStudio: Failed to sync Install build tools

Going crazy with this error from about a couple of hours.

The error is:

failed to find Build Tools revision 23.0.0 rc1

But I think to have all update (also the release candidate!)

This is the image: thank you.enter image description here

This question is related to android android-layout build

The answer is


In case you have error regarding 'SDK build-tools failed' while installing Android Studio, Then you can Download build-tools from - https://androidsdkmanager.azurewebsites.net/Buildtools


Go to File > Project Structure > Select Module > Properties

After that CLICK on your project which will shown in LEFT PANEL

Then Select Properties Change Build Tool Version to 22.0.1

It works for sure


Go to File > Project Structure > Select Module > Properties you will landing to this screenenter image description here

Select Build Tools Version same as version selected in Compile Sdk Version.

Hope this will resolve your issue.


There may be some file access permission/restriction problems. First check to access the below directory manually, check whether your TARGET_VERSION exists, Then check the android sdk manager.

  • sdk/build-tools/{TARGET_VERSION}

I had the same problem, in my cases this happened because I changed the time on my computer to load .apk on google play. I spent a few hours to fix "this" problem until I remembered and changed the time back.


One of the answers ask you to use buildToolsVersion 23.0.0, but you would get buildToolsVersion 23.0.0 has serious bugs use buildToolsVersion 23.0.3. I did that then I started getting message buildToolsVersion 23.0.3 is too low from project app update to buildToolsVersion 25.0.0 and sync again. So I did that and it worked , So here are the final changes.

Inside app's build.gradle change this

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc2"
}

with this one

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0"
}

I had the same issue, with Build Tools revision 24.0.0-rc4. The fix was to install the package using the command line.

~/Android/Sdk| ls -1 build-tools/
23.0.3
24.0.0-rc4
~/Android/Sdk| ./tools/android list sdk -a | grep "SDK Build-tools"
   4- Android SDK Build-tools, revision 24 rc4
   5- Android SDK Build-tools, revision 23.0.3
   6- Android SDK Build-tools, revision 23.0.2
   7- Android SDK Build-tools, revision 23.0.1
   8- Android SDK Build-tools, revision 23 (Obsolete)
   ...
~/Android/Sdk| ./tools/android update sdk -a -u -t 4
   ...
~/Android/Sdk| ls -1 build-tools/
23.0.3
24.0.0-preview
24.0.0-rc4

(note that 4 in the android update sdk command above refers to the preceding list's number for the desired version, found at the beginning of the line).

The directory build-tools/24.0.0-rc4/ had been created when I installed the package from Android Studio's SDK Manager. The above method created build-tools/24.0.0-preview/.

My app-level build.gradle script uses the -rc4 version, as specified in the setup guide:

android {
    compileSdkVersion 'android-N'
    buildToolsVersion '24.0.0-rc4'
}

I do not understand the correlation between -rc4 and -preview or why specifying 24.0.0-rc4 picks up the -preview package, but it did fix the issue for me.


I could fix it by changing it to

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
}

in build.gradle file


I was also facing the same problem with gradle. Now I have solved by installing the highlighted in red. To navigate on this page Open Android studio > Tool > Android > SDK Manager > Appearance & Behavior > System Settings > Android SDK > SDK Tools (from tab options) > Show Package details(check box on the right bottom corner). After installing these just refresh the gradle everything will be resolved.sdk download screenshot


enter image description here

Start the project structure( file>structure) You can see: on the left, modules list;

on the right, Properties>Build Tools Version there maybe are more than one modules.

change "Build Tools Version" for every Module.

it works.


based on your screenshot I can see you have BuildTools ver 23.0.0 rc2 installed. So to get it right open up your gradle build file "build.gradle(Module:app)" and edit buildToolsVersion part like that:

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc2"
}

I faced the same issue today,

And solved it easily by following points

1) Start the StandAlone SDK manager (To open the standalone sdk manager - Tools>Android>SDKManager> at Bottom YOu will see a link to launch StandAlone SDK manager)

2) Delete tha package of SDK Build Tools that you have already installed for e.g 24.0.0 rc4.

3) Close the standalone SDK manager then Restart Android Studio.

4) Once after restart the gradle will start building the project and you will get an alert download the package of SDK build tool and Sync. CLick on that and you will start downloading like that...

I hope this helps


problem:

Error:failed to find Build Tools revision 23.0.0 rc2

solution:

File > Project Structure > click on Modules > Properties
Change Build Tool Version to 23.0.1

its work for me


Had the same problem. I my case the build.gradel(app) was missing buildToolsVersion "27.0.0". So I open a previously working project to determine the version and added this line buildToolsVersion "27.0.0". Now it works fine. Hope this helps.


I had the same problem and fixed it by going to File->Project Structure->Project and changing the Android Plugin Version to 1.3.0-beta1

Hope this helps!


In case you have multiple SDKs locations (might happen if you play around with multiple Android Studio versions and create new location for SDK, what I did), make sure to check the local.properties file (both of the project and of your module, if you have such structure) and check if the line sdk.dir=/home/yourSdkLocation points indeed to the SDK you want to use.

This was the reason it wasn't working for me and it has fixed this.


I have the same problem. i have solved this issue by the following point.

First one is go to inside build.gradle app file and change this

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc2"
}

with this one

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0"
}

I hope this will solve your issue.


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

How to check if a key exists in Json Object and get its value How to center the elements in ConstraintLayout Android - how to make a scrollable constraintlayout? Add ripple effect to my button with button background color? This view is not constrained vertically. At runtime it will jump to the left unless you add a vertical constraint Is it possible to put a ConstraintLayout inside a ScrollView? Differences between ConstraintLayout and RelativeLayout How to remove title bar from the android activity? How to have EditText with border in Android Lollipop Android: ScrollView vs NestedScrollView

Examples related to build

error: This is probably not a problem with npm. There is likely additional logging output above Module not found: Error: Can't resolve 'core-js/es6' WARNING in budgets, maximum exceeded for initial How can I change the app display name build with Flutter? Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0) Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation' Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details Component is part of the declaration of 2 modules Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven