Skip to content

Execution failed for task ':amplitude_flutter:compileDebugKotlin'. (Android Gradle 8) #177

@ssorrychoi

Description

@ssorrychoi

I upgraded flutter sdk version 3.19.1 , Android gradle version 8
But I got this error.

{project}/app/build.gradle
...
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
...

* What went wrong:
Execution failed for task ':amplitude_flutter:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).

  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

Environment

amplitude_flutter: ^3.16.2
Flutter Sdk: 3.19.1
Device: SM F707N
Device OS and Version: Android 13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions