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

fluttertoast:androidJdkImage #527

Open
milanagile opened this issue Aug 13, 2024 · 7 comments
Open

fluttertoast:androidJdkImage #527

milanagile opened this issue Aug 13, 2024 · 7 comments

Comments

@milanagile
Copy link

milanagile commented Aug 13, 2024

Fluttter sdk = 2.2.0
sdk: ">=2.10.4 <3.0.0"

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':fluttertoast:compileDebugJavaWithJavac'.

Could not resolve all files for configuration ':fluttertoast: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: /Users/agilemac49/Library/Android/sdk/platforms/android-31/core-for-system-modules.jar.
> jlink executable /Users/agilemac49/.gradle/jdks/adoptium-8-x64-hotspot-mac/jdk8u422-b05/Contents/Home/bin/jlink does not exist.

@momo2555
Copy link

I have the same issue:

* What went wrong:
Execution failed for task ':fluttertoast:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':fluttertoast: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/momo/Android/Sdk/platforms/android-33/core-for-system-modules.jar.
         > Error while executing process /opt/android-studio/jbr/bin/jlink with arguments {--module-path /home/momo/.gradle/caches/transforms-3/8539d099d6d4d5d2ea71f9998cae88b8/transformed/output/temp/jmod --add-modules java.base --output /home/momo/.gradle/caches/transforms-3/8539d099d6d4d5d2ea71f9998cae88b8/transformed/output/jdkImage --disable-plugin system-modules}

@Fredoski26
Copy link

I have the same issue.

@NehemiahAklil
Copy link

Facing the same issue as well. Any progress on this bug?

@Gilles-kpn
Copy link

Gilles-kpn commented Oct 19, 2024

I have same issue and i solve it actually
It imcompatibility betwen install jdk for android toolchain and flutter used jdk
Go to your application directory
Make an
cd android
Then
./gradlew clean
Configure your java jdk on flutter globally (Adapt it with your jdk path )
flutter config --jdk-dir "/usr/lib/jvm/java-17-openjdk-amd64"
Now close all IDEs and restart the build or run process

@krasylnikov
Copy link

Facing the same issue after the update to Android Studio Ladybug | 2024.2.1 Patch 1. Probably, because the default JDK included in Android Studio now is 21.

@HimaniT07
Copy link

Facing the same issue after the update to Android Studio Ladybug | 2024.2.1 Patch 1. Probably, because the default JDK included in Android Studio now is 21.

@krasylnikov what is the solution then?

@krasylnikov
Copy link

Facing the same issue after the update to Android Studio Ladybug | 2024.2.1 Patch 1. Probably, because the default JDK included in Android Studio now is 21.

@krasylnikov what is the solution then?

There is no solution yet. I will probably use a lower version of JDK from brew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants