When trying to run a local Android build via FlutterFlow, I encounter the following error:
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Upgrading build.gradle
Running Gradle task 'assembleDebug'...
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: ...\core-for-system-modules.jar.
Error while executing process ...\jlink.exe with arguments {--module-path ... --add-modules java.base --output ... --disable-plugin system-modules}[!] This is likely due to a known bug in Android Gradle Plugin (AGP) versions less than 8.2.1, when
setting a value for SourceCompatibility and
using Java 21 or above.
To fix this error, please upgrade your AGP version to at least 8.2.1.