When I use 25.0.0, my project appear some bug(Floating Action Button doesn't show). But I can choice low version.
Error:The SDK Build Tools revision (24.0.3) is too low for project ':app'. Minimum required is 25.0.0
change classpath 'com.android.tools.build:gradle:+' to classpath 'com.android.tools.build:gradle:2.2.2' , and now ,I can use 24.0.3
I would guess that you have a build.gradle file that defines buildToolsVersion "25.0.0". But you only have version 24.0.3 installed.
Either upgrade your build tools by installing a newer version using Tools/Android/SDK Manager/SDK Tools or change the requirements on the app's build.gradle file to require the version you seem to have (24.0.3).
Make sure your compileSdkVersion does not overlap with your buildToolsVersion.
What I do in my project is I match the compileSdkVersion and buildToolsVersion. Looks like this.
compileSdkVersion 24
buildToolsVersion '24.0.2'
defaultConfig {
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Also, you can always check for updates from the SDK Manager in Android Studio.
Please take a look at this also,
What is the buildToolsVersion for android SDK 24?
Cheers!
Related
I am trying to add React-Native-Admob 2.0.0-beta.5 into React-Native v0.55.4 for Android.
compileSdkVersion =26
buildToolsVersion ="27.0.3"
targetSdkVersion = 26
supportLibVersion = "26.1.0"
minSdkVersion = 18
And React-Native-Admob has
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
}
And when i Compile the error Exception occur
The SDK Build Tools revision (23.0.1) is too low for project ':react-native-admob'. Minimum required is 25.0.0
I can't downgrade my project's SDK, other package uses that SDK.
You don't need to downgrade, you need to upgrade. Dependencies were probably added in the SDK that admob relies on. You can download the specified version packages for the SDK through Android studio and then set your SDK version in the file to the appropriate version necessary for admob.
Edit
I see that you are saying that admob is using version 23. You may need to submit an issue with them on GitHub for this.
you can change the buildToolVersion of the library you are using, just go to -> node_modules/{your-library}/android/build.gradle, change buildToolsVersion from 23.0.1 to 25.0.0.
if the studio asks for any updates regarding build, just update it, and it might work.
another solution:
although I haven't tried it, it has a lot of emoji love on GitHub,
https://github.com/oblador/react-native-keychain/issues/68#issuecomment-304836725
Goto
"node-module/react-native-admob/android/build.gradle" file, then change the compileSdkVersion and buildToolsVersion to following values
compileSdkVersion 27
buildToolsVersion "27.0.3"
I am getting this error on the latest version of Android Studio and while I have installed both Android SDK Platform API 25 and Android SDK Build-Tools 25.
As Vishnu said, For me updating Android studio and Gradle didn't fix the problem.
I navigated to Tools -> Android -> SDK Manager and selected BuildTools and checked for the updates related to platform tools. After updating and installing those, fixed my problem.
And for one my friends, the issue got resolved after following the above steps and then navigating to Help->Check for updates-> and installing all the available updates.
Attached Screenshot for the same.
I am facing similar issue after upgrading Android Studio to 3.0. A very simple way to fix this is go to
Tools -> Android ->SDK Manager -> SDK Tools
There look for Android SDK platform tools and update it. (Screenshot attached)
Thats it, you don't have to change any other gradle setting.
I had a similar problem. Updating Android Studio to version 2.2.2 (latest at the time of this writing) and Gradle version to 2.2.2 (latest at the time of this writing) in project_name/build.gradle file fixed this issue.
For reference, this is my config in project_name/app/build.gradle file:
minSdkVersion = 19
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = "25"
supportLibraryVersion = "25.0.0"
And this is my dependencies in project_name/build.gradle file :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Open AndroidMainfest.xml
Click the red icon => Disable inspection => Error is gone
I face same problem but when I swap
buildToolsVersion "25.0.0"
to first line then problem solved. Then the final app grade become:
android {
buildToolsVersion "25.0.0"
compileSdkVersion 25
defaultConfig {
applicationId "com.***"
minSdkVersion 15
targetSdkVersion 25
versionCode 0
versionName "0.0.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Update your android sdk platform-tools to the revision from 24.0.4 to 25.x.x on sdk manager. Then android studio click File->Invalidate Caches/Restart...
The error must be gone now.
Try to update
Android SDK Build-Tools
Android SDK Platform tools
Android SDK Tools
Android Support Repository
Google Play Services
Google repository
etc to the latest version. Error must be gone.
Go to Gradle(app) and replace
buildToolsVersion "25"
to
buildToolsVersion "24.0.4" // Or Latest installed gradle version
also if targetSdkVersion is 25 then make this 24
On command line
./sdkmanager "platform-tools" "platforms;android-26"
./sdkmanager --list
Check if you have update to latest release
There's not much I can say about this. Oh well. Google released a new version of android called Nougat (android N). It is compileSdkVersion 24. However, on the build tools page in the official documentation, it is not mentioned.
I want to give my app to 100% of the people using Google Play Store, which includes android N users.
tl;dr: What should I fill in the buildToolsVersion field?
Thanks.
buildToolsVersion
Using android gradle plugin version > 3 you can remove the android.buildToolsVersion property
Quoting from the New Features section of the Android Gradle plugin release notes for version 3.0.0:
You no longer need to specify a version for the build tools. By default, the plugin automatically uses the minimum required build tools version for the version of Android plugin you're using.
[minSdkVersion, targetSdkVersion, compileSdkVersion]
buildToolsVersion should be set to 25 and 25.0.0, as seen below:
compileSdkVersion 25
buildToolsVersion '25.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
You can get the latest buildToolsVersion from SDK Manager in Android Studio.
I downloaded Arc library form github and imported it as module then I got this error.
Error:Cause: failed to find target with hash string 'android-4' in: C:\Users\shahek\AppData\Local\Android\sdk
Open Android SDK Manager
I also installed Api 15.
This is my build.gradle setting.
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.shahek.myapplication"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
You must install version 23 and all this things must be solved.
If it don't help you,
try to download this library from github and add into project and modify min sdk version in gradle/manifest to yours 18.
Good luck.
I'm I only one who has this issue: in build.gradle of the application I define these:
android {
compileSdkVersion 21
buildToolsVersion "21.0.1"
defaultConfig {
applicationId "my.package.name"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
}
dependencies {
// ...
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
}
And in the end (after syncing project in android studio 0.8.9, updating to 0.8.13) I'm getting error that some resources aren't found though I've downloaded ALL SDK updates?
I'm not using any kind of google play services or etc. Currently the only thing I want is to get "materialized" ActionBar in my Nexus 5 with Lollipop image flashed.
Thanks a lot
I had this issue in Eclipse where my compile target was not set to api 21. As you have set this I can imagine that your gradle setup does not include the resources.
Maybe that helps:
How do I add a library (android-support-v7-appcompat) in IntelliJ IDEA
Yeah I had the same issue in eclipse and what I had to do was:
1. change the android appcompat-v7 project.properties property "target=android-21"
2. change your project project.properties property "target=android-21" too.
I was facing the same issue.
There are 2 things you have to do make sure you are using build tool 21.1.1
and please check your build.gradle file and change the gradle dependency to
classpath 'com.android.tools.build:gradle:0.12.1'
from
classpath 'com.android.tools.build:gradle:0.12.+'
Make sure your sdk is updated to version 21 and in your gradle compileSdkVersion is 21
I hope this will work for you.