I'm working on a Flutter project and while attempting to build a release APK (or running a Gradle assembleRelease task), I encounter the following error:
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 2m 56s Running Gradle task 'assembleRelease'... 177.3s
┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update │ │ the version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of │ │ D:\project\Multi_salon_User_app\android\settings.gradle. │ │ │ │ Alternatively (if your project was created before Flutter 3.19), update │ │ D:\project\Multi_salon_User_app\android\build.gradle │ │ ext.kotlin_version = '' │ └───────────────────────────────────────────────────────────────────────────────────────────────────┘ Gradle task assembleRelease failed with exit code 1
pubspec.yamlfile, one of these packages require a higher version ofkotlin