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

Could not resolve all files for configuration ':stripe_android: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}. #1951

Closed
GiuseppeSperanza opened this issue Oct 4, 2024 · 3 comments
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage

Comments

@GiuseppeSperanza
Copy link

GiuseppeSperanza commented Oct 4, 2024

the problem only occurs with android, with iOS I can do the build correctly.

I cleared the cache of both gradle and the local project

after run flutter build appbundle, the build fails with this reason

What went wrong:
Execution failed for task ':stripe_android:compileReleaseJavaWithJavac'.
> Could not resolve all files for configuration ':stripe_android: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/giuseppesperanza/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
         > Error while executing process /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/jlink with arguments {--module-path /Users/giuseppesperanza/.gradle/caches/8.10/transforms/6bb3f6078521934c4acf3a7108f36720-a1e6a199-f470-41f1-89ed-caf9ea4688b3/transformed/output/temp/jmod --add-modules java.base --output /Users/giuseppesperanza/.gradle/caches/8.10/transforms/6bb3f6078521934c4acf3a7108f36720-a1e6a199-f470-41f1-89ed-caf9ea4688b3/transformed/output/jdkImage --disable-plugin system-modules}

Flutter Version: 3.24.3

Flutter Stripe Version: flutter_stripe: ^11.1.0

@GiuseppeSperanza GiuseppeSperanza added the needs triage Needs triage label Oct 4, 2024
@remonh87
Copy link
Member

remonh87 commented Oct 4, 2024

I need more info on this what is your android configuration etc? Did you follow https://github.com/flutter-stripe/flutter_stripe?tab=readme-ov-file#android?

@remonh87 remonh87 added the Awaiting response Awaiting response from the issuer label Oct 4, 2024
@GiuseppeSperanza
Copy link
Author

GiuseppeSperanza commented Oct 5, 2024

Yes I followed all the steps. I aligned my app to the example project so as to be safe with gradle versions etc., but this problem keeps appearing.. @remonh87 what could I do? The error is the same as this issue

@GiuseppeSperanza
Copy link
Author

GiuseppeSperanza commented Oct 6, 2024

After some debugging I found the issue... I had changed the gradle version and updated the correct jdk after defining the JAVA_HOME, in my case it was 17. However for some reason the project still took the default one from android studio. So I ran the following command flutter config --jdk-dir ‘PATH_TO_JDK_HOME’ in the project.
I restarted android studio and now it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants