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
What went wrong:
Execution failed for task ':flutter_contacts:compileDebugJavaWithJavac'.
Could not resolve all files for configuration ':flutter_contacts:androidJdkImage'.
Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for JdkImageTransform: /home/as/Android/Sdk/platforms/android-34/core-for-system-modules.jar.
Error while executing process /usr/lib/jvm/java-21-openjdk-21.0.4.0.7-2.fc40.x86_64/bin/jlink with arguments {--module-path /home/as/.gradle/caches/8.9/transforms/c10b202ceb5416599890c387b9da5235-94742421-91e7-4f8f-ab84-e78dc738b66c/transformed/output/temp/jmod --add-modules java.base --output /home/as/.gradle/caches/8.9/transforms/c10b202ceb5416599890c387b9da5235-94742421-91e7-4f8f-ab84-e78dc738b66c/transformed/output/jdkImage --disable-plugin system-modules}
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.
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.
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
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
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':flutter_contacts:compileDebugJavaWithJavac'.
Try:
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$