skip to Main Content

I want to run the command gradle detekt on Android Studio’s terminal but I always get the error:

A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.version-check'.
   > Minimum supported Gradle version is 8.7. Current version is 8.2. If using the gradle wrapper, try editing the distributionUrl in C:Users...gradlewrappergradle-wrapper.properties to gradle-8.7-all.zip

But my gradle-wrapper.properties is the following:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-8.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

It is already set on gradle-8.7-all.zip I also have invalidated cache and restarted.

On project structure I have this
enter image description here

Why AS is still saying that my version is 8.2 when I run the command?

I have the "Wrapper" distribution on Gradle settings
enter image description here
Thanks

2

Answers


  1. When you run gradle you are running the Gradle version installed globally on your system.

    To use the locally installed wrapper, you need to run the file gradlew instead (or gradlew.bat on Windows), located in your project root directory1.


    1 Documentation

    Login or Signup to reply.
  2. I just had this problem and invalidating cache fixed the issue.
    File > Invalidate Caches…

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search