QuisApp / flutter_contacts

MIT License
83 stars 138 forks source link

compatibility issues with java 1.8 and java 17 #169

Closed khan-raptee closed 1 month ago

khan-raptee commented 2 months ago

There is a issue with the package


\dino>flutter run
Launching lib\main.dart on 22081283G in debug mode...

FAILURE: Build failed with an exception.

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

* 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 1m 43s
Running Gradle task 'assembleDebug'...                            105.6s
Error: Gradle task assembleDebug failed with exit code 1

please provide the update for package to be compatible with the java17 or how could i use this package for my setup of project which uses java 17 which i can't change.

PcolBP commented 1 month ago

Hello, I've experienced same issue as you did. Created PR which resolved problem. If you don't want to wait for merge you can include change in your pubspec as below:

flutter_contacts: 
    git:
      url: https://github.com/Tradewind-apps/flutter_contacts
      ref: pb/fix-incompatible-java-version-target
joachim-quis commented 1 month ago

Hi all - thanks for your patience and the recommended solutions.

This should be fixed in version 1.1.9. If it is not, please let me know, and reopen this conversation.

Fredricknjeri commented 1 month ago

I am using flutter_contacts: ^1.1.9+1 and the issue is persistent. Solved it by using @PcolBP solution for now