1

yesterday I updated my JAVA (16) and Android Studio Artic Fox. Ever since the update, I am unable to run my flutter project on the Flutter - Android Studio instance, however I am able to run it in the Android - Android Studio instance.

When I run it in the Flutter instance of Android Studio, I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

This is my gradle distribution:

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

Java version

java version "16.0.2" 2021-07-20
Java(TM) SE Runtime Environment (build 16.0.2+7-67)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

Flutter v2.0.3

Please note that I am in no position to upgrade to Grade 6.3 or any other gradle as the organisation requires we keep it at 6.1.1 until further notice.

spongyboss
  • 8,016
  • 15
  • 48
  • 65
  • 1
    change your gradle version in distriution url it should be 6.3 `distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip` – Usama Altaf Aug 25 '21 at 10:39
  • Possible duplicate of https://stackoverflow.com/a/60850178/10659482 – Akif Aug 25 '21 at 10:49
  • I tried changing it to gradle 6.3 but all my flutter pub libraries return incompability errors. I am unable to upgrade the libraries at the moment as this is a company project and they don't want to upgrade the libraries yet. – spongyboss Aug 25 '21 at 11:23

0 Answers0