Gireesh Viswakarma
Gireesh Viswakarma

Reputation: 11

Execution failed for task :app:compileReleaseKotlin. in flutter project

FAILURE: Build failed with an exception.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details

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.

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 !

Upvotes: 1

Views: 1441

Answers (3)

Hammad Khan
Hammad Khan

Reputation: 81

../android/settings.gradle

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.3.2" apply false
    id "org.jetbrains.kotlin.android" version "1.9.24" apply false
}

https://kotlinlang.org/docs/releases.html#release-details`[1]`

Upvotes: 0

Im using Flutter 3.22.3, you can change setting in android/settings.gradle file:

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '7.4.2' apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false}

Change version android with version kotlin.android you using

Upvotes: 0

Sahil Viradiya
Sahil Viradiya

Reputation: 53

In Flutter SDK Version 3.22.0, android/settings.gradle file, replacing this line worked for me:

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.23" apply false
}

I just changed the org.jetbrains.kotlin.android version to 1.9.23

Upvotes: 3

Related Questions