How to Fix gradle:compileGroovy Failed Error in Flutter?

Guide on How to Fix gradle:compileGroovy Failed Error in Flutter:

Are you seeing the ‘gradle:compileGroovy Failed’ error in your terminal after running ./gradlew signingReport command? If so, you have come to the right place! In this article we will discuss the step-by-step guide to fix and resolve the ‘gradle:compileGroovy Failed‘ error.

WhatsApp Group Join Now
Telegram Group Join Now

So, Without any further ado, Let’s get started!

Fix gradle:compileGroovy Failed Error in Flutter

This Groovy error occurs when there is an incompatibility between the Java and Gradle versions.

Follow the steps below to fix gradle:compileGroovy Failed Error:

  1. Type Environment Variables in the windows search and open it.
  2. Now, Select the Environment variables button in the System properties window.
  3. Now, Click on ‘New‘ under System Variables.
  4. Navigate to ‘C:\Program Files\Java\jdk-20‘ and copy the path. (use the latest JDK version)
  5. Set Variable Name as ‘JAVA_Home‘ and Variable value as the copied path. i.e., “C:\Program Files\Java\jdk-20
  6. Now click on the ‘OK’ button.
  7. Check the Gradle version which supports your Java version and use that in your Flutter Project. Refer to the Gradle Compatibility Matrix
    gradle compatibility matrix
    • The Java version 20 supports Gradle version 8.3.
  8. Now, Navigate to your Flutter project: “android >> gradle\wrapper” and select “” file.
  9. Change the Gradle version to 8.3
  10. Now, Run the following commands in your terminal and hit enter.
    • cd android
    • ./gradlew signingReport

I hope this article has helped you to fix gradle:compileGroovy Failed error in your flutter application. If you have any queries, please feel free to ask them in the comment section below. Additionally, consider sharing this article with your friends and the community

Share on:
Vijaygopal Balasa

Vijaygopal Balasa is a blogger with a passion for writing about a variety of topics and Founder/CEO of Androidstrike. In addition to blogging, he is also a Full-stack blockchain engineer by profession and a tech enthusiast. He has a strong interest in new technologies and is always looking for ways to stay up-to-date with the latest developments in the field.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.