what went wrong: execution failed for task ‘:gradle:compilegroovy’. > bug!

shary001
1 min readFeb 17, 2024

--

Recently I want to generate a SHA1 key for my project But unfortunately I faced this error,

“what went wrong: execution failed for task ‘:gradle:compilegroovy’. > bug! exception in phase ‘semantic analysis’ in source unit ‘c:\flutter\packages\flutter_tools\gradle\src\main\groovy\app_plugin_loader.groovy’ unsupported class file major version 65"

Solution of the Above Error

open android folder of your project and the gradle folder and then open gradle-wrapper.properties file you need to update distributionUrl in gradle-wrapper.properties file. Your Project Old distributionUrl is

distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

just chage the version of distributionUrl with new distributionUrl

distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip (copy this and replace with old distributionurl)

after paste the new distributionUrl in gradle-wrapper.properties file open terminal of your IDE type cd android and then paste this ./gradlew signingReport . It take 10 to 15 minutes your error will solved and you can easily generate SHA1 key for your project.

--

--