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

compileDebugJavaWithJavac FAILED #30

Open
SamuelMarks opened this issue Oct 2, 2024 · 1 comment
Open

compileDebugJavaWithJavac FAILED #30

SamuelMarks opened this issue Oct 2, 2024 · 1 comment

Comments

@SamuelMarks
Copy link

What

> Task :compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':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: Library/Android/sdk/platforms/android-33/core-for-system-modules.jar.
         > Error while executing process Library/Java/JavaVirtualMachines/openjdk-22.0.2/Contents/Home/bin/jlink with arguments {--module-path .gradle/caches/transforms-3/819e806557193523a1832f0eb24428cd/transformed/output/temp/jmod --add-modules java.base --output .gradle/caches/transforms-3/819e806557193523a1832f0eb24428cd/transformed/output/jdkImage --disable-plugin system-modules}

Steps to reproduce the behavior:

@ 2aa26db [also tried #13]

  1. cd openfoodfacts-kotlin/openfoodfacts-kotlin
  2. ./gradlew publishToMavenLocal

Expected behavior

Should work. Also tried with --stacktrace but just got a very large output along these lines:

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileDebugJavaWithJavac'.
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)

(i.e., not giving anything specific to openfoodfacts-kotlin)

Platform (Desktop, Mobile, Hunger Games)

  • OS: N/A, host is macOS 15.0 on an M3 with Gradle 8.10.2 and javac 22.0.2
  • Platform Hunger Games

Part of

N/A

@naivekook
Copy link
Contributor

naivekook commented Oct 19, 2024

Works fine on my machine with jdk 17. Can you try a lower version of java?

openjdk 17.0.7 2023-04-18 LTS
OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.42+19-CA (build 17.0.7+7-LTS, mixed mode, sharing)

@teolemon teolemon removed the 🐛 bug Something isn't working label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants