Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlin' (17) #846

Open
ikoshik opened this issue Aug 26, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ikoshik
Copy link

ikoshik commented Aug 26, 2024

Flutter Version

[✓] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-x64, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.2)

pubspec.yaml
environment: sdk: ^3.5.1

android/app/build.gradle

 compileOptions {
       sourceCompatibility JavaVersion.VERSION_17
       targetCompatibility JavaVersion.VERSION_17
       coreLibraryDesugaringEnabled true
}

kotlinOptions {
        jvmTarget = '17'
}

gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

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 'com.android.library' version '8.3.2' apply false
    id "org.jetbrains.kotlin.android" version "1.9.25" apply false
}

Lib Version

My version : assets_audio_player: ^3.1.1

Platform (Android / iOS / web) + version

Platform : android

Describe the bug

FAILURE: Build failed with an exception.

What went wrong:

Execution failed for task ':assets_audio_player_web:compileReleaseKotlin'.
Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlin' (17).

@ikoshik ikoshik added the bug Something isn't working label Aug 26, 2024
@arthas1888
Copy link

any solution?

@EirikFaerdin
Copy link

Has anyone found a way around this?

@arthas1888
Copy link

the problem is this lib assets_audio_player_web, if you don't use environment web please remove, so you can fork it that was my solution

@EirikFaerdin
Copy link

the problem is this lib assets_audio_player_web, if you don't use environment web please remove, so you can fork it that was my solution

Thanks for the tip. I have a local copy as I needed to add duck functionality in order to let my audio play in the foreground if e.g. music was already playing. I have tried to remove assets_audio_player_web, but have not been successful as it generates loads of errors I don't seem to be able to solve.
Any quick suggestions on how to remove the web part?

@passsionforprogramming
Copy link

Seeing this issue as well

@gavnyx
Copy link

gavnyx commented Sep 27, 2024

I got this issue as well, hopefully it can fix soon, please.

@gavnyx
Copy link

gavnyx commented Oct 2, 2024

#830

same issue here

@FreelapResearch
Copy link

Facing the same issue indeed after project update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants
@ikoshik @gavnyx @arthas1888 @florent37 @passsionforprogramming @EirikFaerdin @FreelapResearch and others