QuisApp / flutter_contacts

MIT License
88 stars 143 forks source link

Unable to compile under openjdk 21 #178

Open YesThatGy opened 1 month ago

YesThatGy commented 1 month ago

Repeated failure compiling on AndroidStudio 2024.2.1 (Lady Bug) with Java 21, on Fedora Core 40 or OSX Sequoia. Works fine with java 17 and AndroidStudio 2024.1.1.

Here's the complete output I get when I run gradlew build:

./gradlew build

Configure project :app You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (7.4.2) was tested up to compileSdk = 33

This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=34 to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to use a newer Android Gradle Plugin that has been tested with compileSdk = 34

Task :flutter_contacts:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 19s 139 actionable tasks: 6 executed, 133 up-to-date as@tesla:~/development/shar2/android$

anilthapa1939 commented 1 month ago

Same issue here

evanrich commented 3 weeks ago

if you take a look at the PR where they updated it for jdk 17, you could probably fork this and update to jdk21 yourself, likely just requires changing a few lines from something like JAVA_17 to JAVA_21...etc (paraphrasing here)

PR's are probably welcome as well