Where is gradle build tools version set? - android-studio

I have installed sdk build tools version 28.0.2, and set buildToolsVersion = "28.0.2" in build.gradle. Yet when I run ./gradlew installDebug, I get an error message saying The SDK Build Tools revision (23.0.1) is too low for project.
I even UNinstalled version 23.01.1 via the android studio sdk manager - but then when I run gradlew it reinstalled it!
I ran grep -ri buildtool * to try and find where it might be, but the only reference I could find was in build.grade.
I managed to work around this by upgrading my gradle version to 3.1.0. But as a result, I now get this message:
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.0.
Which tells me that the SDK Build Tools version is being set... somewhere!
Where else is the required build tools version set? How do I change it so that gradle will use the latest version, rather than being stuck on an old one?

I had the same problem. The buildtoolsversion is defined in build.gradle(Module.app).
I removed this line from the file and then the warning disappeared.

Related

The specified Android SDK Build Tools version (28.0.3) is ignored

what can i do in this situation? In Android Studio 4, I'm seeing this issue: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.0. Android SDK Build Tools 26.0.2 will be used.
Change your buildToolsVersion to '29.0.2' in build.gradle file.
As on version Android 4.1.2 it says remove buildToolsVersion "28.0.2" from your build.gradle file since it has its own default build tools now and just Sync it. It worked for me.

Force Android Studio to use gradle 4.1

I have downloaded a previous version of Android Studio (3.0.1) since I must use the android gradle plugin version 3.0.1 and gradle 4.1.
The code, and the other modules it depends on, were written using Android Studio 3.2, kotlin 1.3.10 and gradle version 4.10.2
When I try to synchronize the project with the older version of Android Studio (3.0.1) or running gradlew assembleDebug it says the minimum gradle version is 4.6 even though the gradle wrapper version is 4.1 and the gradle plugin version is 3.0.1. The kotlin version for all dependencies was set on 1.2.41
This is the error:
Minimum supported Gradle version is 4.6. Current version is 4.1.
Please fix the project's Gradle settings. Fix Gradle wrapper and
re-import project Gradle settings
How can I compile such project using older the older version?
You have to use newer gradle wrapper and plugin in order to compile your project, if you want to use AS 3.2. So there is two options for you - upgrade wrapper and plugin, or downgrade AS, plugin, wrapper and kotlin in all dependencies.

Android Studio can't open project

I've recently get update notification of android studio 2.3, after the update it's not opening any project and throwing error:
[plugin: com.darkklord.gradle.metric.core]
after downgrading and reinstalling i still have this issue, can anyone please help me on this topic ?
Download latest plugin from here: https://plugins.jetbrains.com/plugin/9197-android-gradle-metrics--checkstyle
Install Plugin manually from disk.
Restart Android Studio (The error will still occur)
Remove plugin in IDE.
Restart
You might also uninstall the refrenzed plugins Checkstyle and PMD
You need to change your dependency
classpath 'com.android.tools.build:gradle:3.1.0'
Sometimes you need to change name of project manually(look at AndroidStudioProjects folder) that you opened lastly.
After changing name, android studio will show all projects,
open one of them,
in file menu,
click open button,
then open your desire project (or change its name to its previous name)
change build:gradle plugin to:
classpath 'com.android.tools.build:gradle:3.3.2'
(in app gradle file)
I made sure that my Gradle version was compatible with my android gradle plug in. In my case I was using Gradle 6.0.1 and when I changed my android gradle plug in to version 3.5.3 the problem went away.
Project Structure----->> Project ------>> Android Gradle plug in version 3.5.3.
[https://docs.gradle.org/6.0.1/release-notes.html
[Java 14 and later versions are not yet supported.
Compatibility Notes
A Java version between 8 and 13 is required to execute Gradle.
Java 6 and 7 can still be used for compilation and forked test execution. Just like Gradle 5.x, any supported version of Java can be used for compile or test.
This version of Gradle is tested with
-------->>>>>>>>Android Gradle Plugin 3.4, 3.5 and 3.6
Kotlin 1.3.21 through 1.3.50
Other versions may or may not work.]]]]
I hope this helps

Where is build:gradle:2.1.0-alpha3?

I have Just installed Android Studio Version 2.1 Preview 3 (AI-143.2682553)
When I run my project I get an error, it says:
Could not find com.android.tools.build:gradle:2.1.0-alpha3.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0-alpha3/gradle-2.1.0-alpha3.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0-alpha3/gradle-2.1.0-alpha3.jar
When I look in the Jcenter repository it only has 2.1.0-alpha1 https://jcenter.bintray.com/com/android/tools/build/gradle/
So I get why it can't find alpha3, but when I change the build.gradle to 2.1.0-alpha1 it says:
"The projects is using an incompatible version of the android Gradle plugin.
To continue opening the project, the IDE will update the Android Gradle plugin to version 2.1.0-alpha3"
which doesn't seem to exist right ?
Android Plugin for Gradle version 1.5.0 does not support Instant Run. Please update to version 2.1.0-alpha3
I had the similar problem and I fixed it by update it in android studio,just like this!
after update ,I find out the changes of gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-alpha3'
// classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
buildToolsVersion '24 rc1'//buildToolsVersion "23.0.2"
I had the similar issue with 2.1.0-alpha3 .. my project cannot be complied ..I used earlier version 2.1.0-alpha1 # http://tools.android.com/download/studio/builds/android-studio-2-1-preview-1
By uninstalling and installing older version.
Hope that may help.

Problems with Gradle in Android Studio

I had to reinstall Android Studio and now when I try to build my projects I get this error:
org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.
I tried editing system variables and Android Studio settings but nothing has seemed to work.
Andrew
This is a problem with the Android plugin v0.7.2 and will be fixed in 0.7.3. In the meantime you can force it back to 0.7.1 following the answer here:
Android Studio fails - unsupport unsupported major minor version 51.0

Resources