Every time I attempt to build an Android app from FF desktop app I get the following error. How can I fix it ??
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Upgrading build.gradle
Running Gradle task 'assembleDebug'...
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webview_flutter_android:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':webview_flutter_android:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/gchimera/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
> Error while executing process /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/jlink with arguments {--module-path /Users/gchimera/.gradle/caches/transforms-3/5ceadaca1b28532342a843892525f59a/transformed/output/temp/jmod --add-modules java.base --output /Users/gchimera/.gradle/caches/transforms-3/5ceadaca1b28532342a843892525f59a/transformed/output/jdkImage --disable-plugin system-modules}
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 3s
Running Gradle task 'assembleDebug'... 3,6s
โโ Flutter Fix โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ [!] This is likely due to a known bug in Android Gradle Plugin (AGP) versions less than 8.2.1, โ
โ when โ
โ 1. setting a value for SourceCompatibility and โ
โ 2. using Java 21 or above. โ
โ To fix this error, please upgrade your AGP version to at least 8.2.1. The version of AGP that โ
โ your project uses is likely defined in: โ
โ /Users/gchimera/Library/Application โ
โ Support/io.flutterflow.prod.mac/chimera_dev_test/android/settings.gradle, โ
โ in the 'plugins' closure (by the number following "com.android.application"). โ
โ Alternatively, if your project was created with an older version of the templates, it is likely โ
โ in the buildscript.dependencies closure of the top-level build.gradle: โ
โ /Users/gchimera/Library/Application โ
โ Support/io.flutterflow.prod.mac/chimera_dev_test/android/build.gradle, โ
โ as the number following "com.android.tools.build:gradle:". โ
โ โ
โ For more information, see: โ
โ https://issuetracker.google.com/issues/294137077 โ
โ https://github.com/flutter/flutter/issues/156304 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Error: Gradle task assembleDebug failed with exit code 1