Related
It is my developed project with target API 23. Now I'm using Studio 2.1.3
When I am trying to open this project the error show me like Error:failed to find Build Tools revision 24.0.0 rc2 Install Build Tools 24.0.0 rc2 and sync project
But when I try to install, then a error message shown.
It was a big project, I have to run it. How can I sync it and run it properly? Please help me, Thanks in advance..
Screenshot 1: this is the error message
Screenshot 2: when i click to install and sync then this error message has appeared
Update the android-sdk tools to the newest version: 24.0.2
Change your Android Support libraries version like appcompat from 23.x.x version to 24.2.0
If you would any problem with updating dependencies, check: https://developer.android.com/studio/intro/update.html#sdk-manager
Tip: Try to avoid use in your project alpha,preview or beta versions of project dependencies.
Hope it will help
At the top of your module's build.gradle file there's a specification which build tools the module uses. Fix it to latest.
buildToolsVersion "24.0.2"
Check your connection to google servers.Some countries like Iran should use VPN to connect.
Hop it work
Go to build.gradle(Module:app) and update the buildToolsVersion '24.0.0 rc2' to buildToolsVersion '24.0.0' or to the latest version
I am trying to build my first app with react-native.
I am following these 2 tutorial:
https://facebook.github.io/react-native/docs/getting-started.html#content
https://facebook.github.io/react-native/docs/android-setup.html
I am sure that I installed all the requirements from the second link but when I try running my app with react-native run-android, I get the following error:
I executed this command while running genymotion.
This is all that I have installed in Android SDK:
I tried to install Android build tools 23.0.1 but I get this error:
What should I do?
You should install Android SDK Build Tools 23.0.1 via Android SDK. Don't forget to check Show Packages Details.
I faced the same problem and I solved it doing the following:
Go to /home/[USER]/Android/Sdk/tools
and execute:
$android list sdk -a
Which will show a list like:
Android SDK Tools, revision 24.0.2
Android SDK Platform-tools, revision 23.0.2
Android SDK Platform-tools, revision 23.0.1
... and many more
Then, execute the command (attention! at your computer the third option may be different):
$android update sdk -a -u -t 3
It will install the 23.0.1 SDK Platform-tools components.
Try to build your project again.
Either install v23.0.1 of the build tools (the fifth row in your screenshot), or change your code to use the build tools version you already have installed (v23.0.3). This can be specified in your app's build.gradle file:
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
...
}
}
As per duncanc4's comment below,
The build.gradle file you want to edit is in the android/app folder
within your project directory.
The error you're getting seems to be related to system's permissions, since it's not able to create a folder.
Try running the sdk-manager using root (with su or sudo commands).
I had this error:
Failed to find Build Tools revision 23.0.2
When you got updated/installed:
Android SDK Build Tools
Android SDK Tools
Change version number in build.gradle
FROM
buildToolsVersion "23.0.2"
TO
buildToolsVersion "25.0.2"
How to find what Build Tools version you have
Check your $ANDROID_HOME, sometimes is /usr/local/opt/android, but it's not your install sdk path, change it and fix this problem
Nothing helped until I found this solution : https://stackoverflow.com/a/39068538/3995091
In Android SDK, the build tools with the correct version where shown as installed, but still I got the same error saying they couldn't be found. When I used the above solution, I found out they were indeed not installed, although Android SDK thought they were. Installing them solved it for me.
While running react-native In case you have installed 23.0.3 and it is asking for 23.0.1 simply in your application project directory. Open anroid/app/build.gradle and change buildToolsVersion "23.0.3"
In the Gradle Console (link available in the window bottom right), you have two tabs: the error is shown in Gradle Build tab. Click on the Gradle Sync tab, then click on the Install Build Tools XX.X.X and sync project link. This will download the build version required by your project.
You may also change your project SDK version but you don't always have this option if it is imposed.
If you already install the correct Android SDK Platform-Tools (Build Tool) and you still get an error, try to invalidate the cache; File -> Invalidate caches / Restart....
On my system, Android SDK Manager showed /usr/local/Cellar/android-sdk as the SDK path, when $ANDROID_HOME was /Users/james/Library/Android/sdk. I just added a symlink for the correct build tools version.
Two solutions: You have to instal the required buildToolVersion or set it as described above.
Notice that if you are trying to set the buildToolsVersion "23.0.3" using Android Studio 3.0 or more it won't work until you remove all builversion you have keeping just one last version you use.
I read this somewhere else and this works for me.
Hope this helps.
As the error says
Failed to find build Tools revision 23.0.1
This means that in your project you have used
buildToolsVersion "23.0.3"
So,You need to download the exact same version this makes the error disappear
**Step 1:**
GO to Tools and click SDK Manager
**Step 2:**
you can see SDK Platforms ,SDK Tools and SDK update Sites
**Step3:**
Click SDK Tools and click show package details
**Step 4:**
Select the version that you have mentioned in your Project
These Steps has solved my issue.
If anyone can't build their downloaded source code (probably google codelabs source code) with Android Studio, try simply remove the buildToolsVersion from the build.gradle file, and Android Studio will build the project with it's default latest buildToolVersion
¯_(ツ)_/¯
Each version of the Android Gradle Plugin now has a default version of the build tools.
So, probably you specified build tool version explicitly in the build file.
Just remove buildToolsVersion = "x.y.z" from your build.gradle script.
If, for some reason, you need that specific revision, follow the other answer.
Just install it from Android Studio ;)
As of today I've been running into an error setting up new projects in Android Studio. Right after creating a blank project the log mentions "Gradle sync failed: failed to find Build Tools revision 24.0.0 rc1."
First I looked online to see how to resolve this and came across this similar question, and followed the solution given (setting the build tools version in the module settings). However, this results in Android Studio telling me that the method "android()" cannot be found and "The project 'TestBlankApplication' may be using a version of Gradle that does not contain the method."
Additionally, the SDK Manager informs me that I have Build-tools 24 rc1 installed. So I do not know why Android Studio cannot find it.
Screencap of SDK Manager showing 24 rc1 installed:
Does anyone know how this can be resolved? Thank you.
Why you got this error:
Android studio does not come with build tools for different android versions when you download it. It also does not make sense since there are multiple versions of build tools and each of them will take hundreds of megabytes on your hard drive. This is why Android Studio installation package is 1 GB while Xcode, which has all the build tools, is 6 GB
When you choose a specific build version in the build.gradle file, your android studio may or may not have that version of build tool installed. And if not, you will see the error complaining about it.
How to fix it
You just need to install the specific version of build tool mentioned in build.gradle like this:
Click File > Settings (on a Mac, Android Studio > Preferences) to
open the Settings dialog.
Go to Appearance & Behavior > System Settings > Android SDK (Or
simply search for Android SDK on the search bar)
Go to SDK Tools tab > Check the Show Package Details check box
Select the specific version of the build tool and click on the Apply
button
After the installation, sync the project
Demos
(I choose a different version just to show you how to apply the changes by that apply button :) )
And then sync the project. The error is gone now!
Try to change the buildToolsVersion for 23.0.2
in Gradle Script build.gradle (Module App)
and set buildToolsVersion "23.0.2"
then rebuild
Follow the below procedure to solve the error.
Go to File -> Project structure.
From the drop down box, you will know all the version of build tools that are installed in your android studio.
Look for a higher version. If Gradle cannot find 24.0.0, check if 24.0.1 is present in drop down.
Do a complete code search. Find all the places where "24.0.0" is found. Replace it with "24.0.1"
Do a gradle sync.
I had same problem and eventually found out that in file build.gradle the version does not match the version of buildTools in my installed sdk.
(because I imported project done at home on different computed with updated sdk)
before:
build.gradle(app): buildToolsVersion "24.0.2"
Android\sdk\build-tools: file "25.0.1"
fixed:
build.gradle(app): buildToolsVersion "25.0.1"
Then just sync your project with gradle files and it should work.
SDK tools required build tool version installation helped me.
You just need to install required build tool version from,
SDK Manager -> SDK tool -> Show Package details -> Select required build tool version and install it.
Go to Build Gradle (Module:app)
Change the following.
In my case, I choose 25.0.3
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.cesarhcq.viisolutions"
minSdkVersion 15
targetSdkVersion 25
After that, it works fine!
Android Studio updating didn't work for me. So I updated it manually. Go to your sdk location, run SDK Manager, mark desired build tools version and install.
I ran into this problem after a fresh install of Android Studio (in GNU/Linux). I also used the installation wizard for Android SDK, and the Build Tools 28.0.3 were installed, although Android Studio tried to use 28.0.2 instead.
But the problem was not the build tools version but the license. I had not accepted the Android SDK license (the wizard does not ask for it), and Android Studio refused to use the build tools; the error message just is wrong.
In order to solve the problem, I manually accepted the license. In a terminal, I launched $ANDROID_SDK/tools/bin/sdkmanager --licenses and answered "Yes" for the SDK license. The other ones can be refused.
faced the same problem: Gradle sync failed: failed to find Build Tools revision x.x.x
reason: the build tools for that version was not down loaded properly
solution:
Click File > Settings (on a Mac, Android Studio > Preferences) to open the Settings dialog.
Go to Appearance & Behavior > System Settings > Android SDK (Or simply search for Android SDK on the search bar)
Go to SDK Tools tab > Check the Show Package Details checkbox
uncheck the specific version to remove it.
click apply.
then follow the steps 1 to 3 and 6.
Select the specific version of the build tool and click on the Apply button
After the installation, sync the project
Another thing is that all libraries from google (e.g. support lib, CardView and etc.) should have identical versions
I ran into a same problem.
I was running portable version of android studio so downloaded a package from https://developer.android.com/studio/#downloads
and installed it, and like that, done!
1) You need to change to version that is available on you studio
2) Here is how you find out version that is available for your studio
Go to File -> Project structure.
source is from #Siddarth Kanted Thanks to Siddarth Kanted.
3) And when you want to install more versions of build tool you can learn it from #Fangming user from this post.
easy working solution.
I have updated android studio with latest version and then after googling I also updated Android SDK with API 18 but still it gives the same error.
Just click on the link written in the error:
Open Android SDK Manager
and it will show you the dialogs that will help you to install the required sdk for your project.
Open the Android SDK Manager and Update with latest :
Android SDK Tools
Android SDK Build Tools
Then Sync ,Re-Build and Restart Your Project
Demo Code for build.gradle
compileSdkVersion 21 // Now 23
buildToolsVersion '21.1.2' //Now 23.0.1
defaultConfig
{
minSdkVersion 15
targetSdkVersion 19
}
Hope this helps .
Okay you must try this guys it works for me:
Open SDK Manager and Install SDK build tools 22.0.1
Sync gradle That'all
I modified build.gradle compileSdkVersion to 23 from 22 and targetSdkVersion to 23 from 22.
My API level was 23. I had to update the API version to 23 as well.
I had to import my project from Eclipse to Android Studio. It worked for me.
I had similar issue. I updated android studio build tools and my project didn't find "android-22". I looked in android sdk manager and it was installed.
To fix this issue I uninstalled "android-22" and installed again.
I created a new Cordova project, which created with latest android target android level 23. when i run it works. if i changed desire android target value from 23 to 22. and refresh the Gradle build from the Andoid Studio. now it's fail when i run it. i got the following build error.
project-android /CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java
Error:(217, 22) error: cannot find symbol method requestPermissions(String[],int)
I changed the target level in these files.
project.properties
AndroidManifest.xml
and inside CordovaLib folder.
project.properties
However, i also have another project which is using the android target level 22, whenever i run that project, it runs. Now my question is can we specify the desire android level at the time of creating the project?
I think you should install API 18 from android sdk if not already installed, otherwise you can try "invalidate caches and restart" (Find: File->invalidate caches and restart).
Change
compileSdkVersion 18
minSdkVersion 10
targetSdkVersion 18
in build.gradle in your app directory/module
Or Download Latest API Version
In sdk Manager download android 5.1.1, it worked for me
Open project.properties file and change the line with target=android-22 to the desired value.
For example:
target=android-19
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.
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.
I could fix it by changing it to
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
}
in build.gradle file
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 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.
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!
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
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"
}
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"
}
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.
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}
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 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.
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
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
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.