The "minimum supported version of Gradle with version 4.4" began today; no code changes

Today, several developers on my team began to see this error when they try to run any Gradle task.

* Where: Build file 'C:\dev\src\my_app_name\app\build.gradle' line: 1 * What went wrong: A problem occurred evaluating project ':app'. > Failed to apply plugin [id 'com.android.application'] > Minimum supported Gradle version is 4.4. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in C:\dev\src\my_app_name\gradle\wrapper\gradle-wrapper.properties to gradle-4.4-all.zip 

There were absolutely no code or configuration changes; Gradle builds just started crashing unexpectedly. Does anyone know why this will happen? My best guess: a plugin depending on a specific version of Gradle will automatically update, but I'm not sure how to determine which one it is. The line number would suggest that it was a com.application.plugin plugin.

I know that updates for Android Studio often require a corresponding upgrade to Gradle, but no one in my team has updated Android Studio. And according to the Android- Studio version-compatibility table, Gradle Gradle 4.1 will still work with Android Studio 3.0.1, this is what I have been running for some time.

We recently started using Kotlin, and I thought it might be part of the problem, but completely removing everything related to Kotlin did not help.

I tried to remove the Gradle caches/ directory by running ./gradlew cleanBuildCache , deleting the build/ project directories, destroying the Gradle daemons via ./gradlew --stop and reloading - all to no avail.

I also tried upgrading to Gradle 4.4, but this led to a "CIRCULAR REFERENCE" NullPointerException during a DexMergerTransform ( separate issue ) for reasons that are completely incomprehensible to me. I would like to force my environment NOT to accept the Gradle 4.4 dependency right now ... but I don't know what caused this dependency unexpectedly.

+7
android gradle
source share
1 answer

The problem was that we used a non-specific version of the plugin. When the changes were made to the plugin, the new version was uploaded to our development environment, and it introduced a dependency on the Gradle version higher than the one we used.

In our case, it was the culprit:

classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'

Switching to Butterknife plugin version 8.5.1 eliminates the dependency on Gradle 4.4.

+7
source share

All Articles