FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileReleaseKotlin’.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
- 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 1m 35s
Running Gradle task ‘assembleRelease’… 96.7s
Gradle task assembleRelease failed with exit code 1
i tried by changing java home and invalidating cache and restart the android studio. but still the same error happen !
2
Answers
In Flutter SDK Version 3.22.0, android/settings.gradle file, replacing this line worked for me:
I just changed the org.jetbrains.kotlin.android version to 1.9.23
Im using Flutter 3.22.3, you can change setting in android/settings.gradle file:
Change version android with version kotlin.android you using