Hi all, I am new here :slightly_smiling_face: Can ...
# community-support
s
Hi all, I am new here 🙂 Can anyone help with this: FAILURE: Build failed with an exception. * What went wrong: Could not open cp_settings generic class cache for settings file 'C:\_flutterSampleApp\samples\navigation_and_routing\android\settings.gradle' (C:\Users\alsa1705\.gradle\caches\7.3\scripts\z8ugfs235xyukxdw89tokezo).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
I am using java 17.0.12 and Gradle 7.3 I read a lot, but it seems that always fails, not sure why
r
The error suggest that there is a build script dependency that required Java 21 (class file major version 65 is Java 21)
s
Yes, I ressolved that in a meantime and thank you, now I have this: * What went wrong: Execution failed for task 'url launcher androidcompileDebugJavaWithJavac'.
Could not resolve all files for configuration 'url launcher androidandroidJdkImage'.
> 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: C:\Users\alsa1705\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar. > Error while executing process C:\Program Files\Android\Android Studio2\jbr\bin\jlink.exe with arguments {--module-path C:\Users\alsa1705\.gradle\caches\transforms-3\d3fed278fa64d2b63863cd0504c0d09c\transformed\output\temp\jmod --add-modules java.base --output C:\Users\alsa1705\.gradle\caches\transforms-3\d3fed278fa64d2b63863cd0504c0d09c\transformed\output\jdkImage --disable-plugin system-modules}
v
Actually, the original error did not suggest that a dependency needs Java 21, but that a Gradle 7.3 build is run using Java 21 which it does not support. The new error seems to not be so much a Gradle question, or at least very Android specific. It calls
jlink
and that fails for some reason. You probably have to scroll up to see the actual error, or maybe enable
--info
or
--debug
.
✅ 1