AndroidStudio: Failed to sync Install build tools

匿名 (未验证) 提交于 2019-12-03 01:55:01

问题:

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.

回答1:

Go to File > Project Structure > Select Module > Properties you will landing to this screen

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

Hope this will resolve your issue.



回答2:

I could fix it by changing it to

android {     compileSdkVersion 23     buildToolsVersion "23.0.3" } 

in build.gradle file



回答3:

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.



回答4:

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.



回答5:

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!



回答6:

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



回答7:

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.



回答8:

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



回答9:

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


回答10:

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}


回答11:

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.



回答12:

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



回答13:

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.



回答14:

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



回答15:

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.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!