If you get the above error/warning message for your Java Project with a Gradle Build tool on IntelliJ IDE (say Android Studio) then you can do one of the below steps to resolve this issue.
Update Gradle Wrapper (Android Studio)
- Open your project in Android Studio IDE
- Go to the gradle/wrapper directory in your project folder.
- Open the file gradle-wrapper.properties.
- Change the distributionUrl to Gradle version as per below compatibility table.
Example:distributionUrl=https\://services.gradle.org/distributions/gradle-<version>-bin.zip
#Fri Aug 18 16:53:39 CST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
Plugin Version Minimum Required Gradle Version 8.3 8.3 8.2 8.2 8.1 8.0 8.0 8.0 7.4 7.5 7.3 7.4 7.2 7.3.3 7.1 7.2 7.0 7.0 4.2.0+ 6.7.1 4.1.0+ 6.5+ 4.0.0+ 6.1.1+ 3.6.0 - 3.6.4 5.6.4+ 3.5.0 - 3.5.4 5.4.1+ 3.4.0 - 3.4.3 5.1.1+ 3.3.0 - 3.3.3 4.10.1+ 3.2.0 - 3.2.1 4.6+ 3.1.0+ 4.4+ 3.0.0+ 4.1+ 2.3.0+ 3.3+ 2.1.3 - 2.2.3 2.14.1 - 3.5 2.0.0 - 2.1.2 2.10 - 2.13 1.5.0 2.2.1 - 2.13 1.2.0 - 1.3.1 2.2.1 - 2.9 1.0.0 - 1.1.3 2.2.1 - 2.3
Update build.gradle script
- Open the build.gradle file in your project folder.
- Make sure that the Gradle plugin version specified in the build.gradle file is compatible with Gradle X.0 for which you are getting the error.
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to Gradle,
- Run only a Single Unit Test using Gradle
- Run IntelliJ Java main method without Gradle build
- How to force re-download Gradle Dependencies
- How to Run Gradle Build Without Unit Test Cases
- Find installed Gradle version command
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- Generate Project Dependency tree using Gradle Command
- Installing Gradle on macOS - Gradle Tutorial
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- [Fix] ./gradlew: Permission denied
- Force Gradle to use specific Java JDK Version
- [fix] Deprecated gradle features were used in this build, making it incompatible with Gradle X.0
- Create a Gradle Java Project in VS Code
- Install Gradle VS Code for Java Projects
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- How to create Gradle Multi-Project in IntelliJ
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Error: Could not find or load main class org.gradle.wrapper. GradleWrapperMain
- [fix] bash: gradlew: command not found
- [fix] Execution failed for task :core:compileJava - Could not find tools.jar
- Run Gradle Build without test cases
- How to add maven central repository in build.gradle
- Upgrade Gradle in Android Studio
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
More Posts:
- Setting JAVA_HOME in macOS Big Sur - MacOS
- Fix Error: Unknown command: --cask [Homebrew] - MacOS
- Change File Created Date and Time using Mac Terminal Command - MacOS
- How to Copy a remote file to local using SFTP command? - FTP
- How to Reset Eclipse Theme to Classic - Eclipse
- Program 2: Print your name using print() function - 1000+ Python Programs - Python-Programs
- How to enable Do Not Disturb mode for Notification Center in Mac OS X 10.10 Yosemite - Mac-OS-X
- [Solution] Error: brew cask is no longer a brew command - MacOS