I have a problem with Local Run on flutterflow with Android studio.

Custom Code

I am trying to run Local Run funtion with android studio on my pc, but i keep getting the same message of the AGP version being to Old. And i have searched everywhere on youtube tried gemini and chatgpt my still get the same error message from flutterflow:

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: C:\Users\jeffn\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar.

> Error while executing process C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe with arguments {--module-path C:\Users\jeffn\.gradle\caches\transforms-3\0c380cde9558ef3fa88ff22eb6ae8136\transformed\output\temp\jmod --add-modules java.base --output C:\Users\jeffn\.gradle\caches\transforms-3\0c380cde9558ef3fa88ff22eb6ae8136\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 9s

Running Gradle task 'assembleDebug'... 10,0s

β”Œβ”€ 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: β”‚

β”‚ C:\Users\jeffn\AppData\Roaming\FlutterFlow\flutterflow\go_frakt\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: β”‚

β”‚ C:\Users\jeffn\AppData\Roaming\FlutterFlow\flutterflow\go_frakt\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

What have you tried so far?

I have added Java 17 to my path on my PC, i have added flutter to the path on my pc, i have tried to change the version to 8.2.1 in the file the error message gave me. I have tried mulitple diffrent phones on android studio, now using a API 35

Did you check FlutterFlow's Documentation for this topic?
Yes
9
15 replies