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

Execution failed for task ':image_gallery_saver:compileDebugKotlin #1744

Closed
1 task done
bensonarafat opened this issue Oct 6, 2023 · 6 comments
Closed
1 task done
Labels
bug Something isn't working Stale

Comments

@bensonarafat
Copy link

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Android

What version are you using?

versions 6.11.0

What happened?

I just tried to run my app, i am getting the error.
I am using the latest flutter SDK version, after investigation i found out that one of the dependency called image_gallery_saver is causing the error

Steps to reproduce

Add the dependency and start debugging for my emulator

Supporting info to reproduce

No response

Relevant log output

* What went wrong:
Execution failed for task ':image_gallery_saver:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

Flutter analyze output

No response

Flutter doctor output

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version
    10.0.22621.2134], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.      
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of 
      its default components
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.83.0)
[√] Connected device (3 available)
[√] Network resources

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bensonarafat bensonarafat added the bug Something isn't working label Oct 6, 2023
@esarbanis
Copy link
Contributor

Hi @bensonarafat ,

Thank you for opening this up. Can you please confirm that you have tried what is mentioned here and here, with no success?

@bensonarafat
Copy link
Author

I had to use stream_chat instead..
stream_chat_flutter depends image_gallery_saver
and it is flagging an error because of namespace from image_gallery_saver

@esarbanis
Copy link
Contributor

@bensonarafat I cannot reproduce it in the latest version, can you confirm that you have setup your environment to the correct java version and it is still happening?

Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@hqutrung
Copy link

Hello, has anyone solved this case?

@furqan23
Copy link

Hi as the error states that image_gallery_saver is using different compile version. This error mostly happen when u upgrade gradle plugin above 7.6.3 and java/koltin option abouve 18/1.8 respectectively. So you can place

subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jvmTarget = "1.8"
}
}

in android/build.gradle so if any project is using these conflicting kotlin and java version they will consume the right one
Thanks

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

No branches or pull requests

4 participants