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

Flutter 3.24 build apk issue #5542

Open
2 of 14 tasks
KishanD24 opened this issue Oct 13, 2024 · 10 comments
Open
2 of 14 tasks

Flutter 3.24 build apk issue #5542

KishanD24 opened this issue Oct 13, 2024 · 10 comments
Labels
auth Issues related to the Auth Category not-reproducible Issues that cannot be reproduced using the steps provided pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members question A question about the Amplify Flutter libraries

Comments

@KishanD24
Copy link

Description

amplify_auth_cognito Having issue win32 and 2nd is as below issue

i fixed win32 by adding
dependency_overrides:
win32: ^5.6.0

but still having issue in flutter 3.24 as below

  • What went wrong:
    Execution failed for task ':amplify_analytics_pinpoint:compileReleaseJavaWithJavac'.

Could not resolve all files for configuration ':amplify_analytics_pinpoint: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: C:\Users\Kishan\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar.
> Error while executing process C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe with arguments {--module-path C:\Users\Kishan.gradle\caches\transforms-3\4a46fc8
9ed5f9adfe3afebf74eb8bfeb\transformed\output\temp\jmod --add-modules java.base --output C:\Users\Kishan.gradle\caches\transforms-3\4a46fc89ed5f9adfe3afebf74eb8bfeb\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.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

Just run in flutter 3.24

Screenshots

Screenshot 2024-10-13 132211

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.3

Amplify Flutter Version

2.4.1

Deployment Method

Amplify Gen 2

Schema

No response

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Oct 13, 2024
@tyllark
Copy link
Member

tyllark commented Oct 14, 2024

Hi @KishanD24, thank you for taking the time to submit this issue. We will look into it and provide updates when we can.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Oct 14, 2024
@tyllark tyllark added auth Issues related to the Auth Category pending-maintainer-response Pending response from a maintainer of this repository to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided labels Oct 14, 2024
@passsy
Copy link
Contributor

passsy commented Oct 14, 2024

I have the same problem, changing the win32 version does not resolve the issue for me

@NikaHsn
Copy link
Member

NikaHsn commented Oct 14, 2024

@passsy @KishanD24 would you please provide reproduction steps so that we can investigate this issue. thanks.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Oct 14, 2024
@NikaHsn NikaHsn added the pending-community-response Pending response from the issue opener or other community members label Oct 14, 2024
@passsy
Copy link
Contributor

passsy commented Oct 15, 2024

  1. Create a flutter project
  2. add amplify_auth_cognito
  3. Build the android version

We discovered that is was caused by JDK 21. Downgrading to JDK 17 resolved the issue

@github-actions github-actions bot added pending-maintainer-response Pending response from a maintainer of this repository and removed pending-community-response Pending response from the issue opener or other community members labels Oct 15, 2024
@KishanD24
Copy link
Author

KishanD24 commented Oct 15, 2024 via email

@alishawnee
Copy link

Description
Build fails with amplify auth

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':amplify_analytics_pinpoint:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':amplify_analytics_pinpoint: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: C:\Users\alish\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar.
         > Error while executing process C:\Program Files\Android\Android Studio1\jbr\bin\jlink.exe with arguments {--module-path C:\Users\alish\.gradle\caches\transforms-3\4a46fc8
9ed5f9adfe3afebf74eb8bfeb\transformed\output\temp\jmod --add-modules java.base --output C:\Users\alish\.gradle\caches\transforms-3\4a46fc89ed5f9adfe3afebf74eb8bfeb\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.

BUILD FAILED in 22s
Running Gradle task 'assembleDebug'...                             23.6s
Error: Gradle task assembleDebug failed with exit code 1

Development environment

  • Flutter 3.24.3
  • Dart 3.5.3
  • DevTools 2.37.3
  • java 17.0.11 2024-04-16 LTS
  • O.S window 11

amplify packages
amplify_flutter: ^2.4.1
amplify_auth_cognito: ^2.4.1

reproduction steps
Create a flutter project
add amplify_auth_cognito
Build the android version

@NikaHsn
Copy link
Member

NikaHsn commented Oct 15, 2024

@passsy @KishanD24 @alishawnee thanks for providing the info. we will look into this issue and get back to you with any updates.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Oct 15, 2024
@NikaHsn NikaHsn added question A question about the Amplify Flutter libraries and removed pending-triage This issue is in the backlog of issues to triage labels Oct 15, 2024
@NikaHsn
Copy link
Member

NikaHsn commented Oct 16, 2024

@passsy @KishanD24 @alishawnee I was not able to reproduce this issue following the steps. I get the below error if I do not update android platform settings as described here.

Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [:amplify_auth_cognito] /Users/nikaws/gh-issues/gh5542/build/amplify_auth_cognito/intermediates/merged_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 21
  	Suggestion: use a compatible library with a minSdk of at most 21,
  		or increase this project's minSdk version to at least 24,
  		or use tools:overrideLibrary="com.amazonaws.amplify.amplify_auth_cognito" to force usage (may lead to runtime failures)

After following the android platform setup I was able to build the android app and run it sucessfully.

@NikaHsn NikaHsn added not-reproducible Issues that cannot be reproduced using the steps provided pending-community-response Pending response from the issue opener or other community members and removed to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided labels Oct 16, 2024
@KishanD24
Copy link
Author

KishanD24 commented Oct 17, 2024 via email

@github-actions github-actions bot added pending-maintainer-response Pending response from a maintainer of this repository and removed pending-community-response Pending response from the issue opener or other community members labels Oct 17, 2024
@NikaHsn
Copy link
Member

NikaHsn commented Oct 17, 2024

thanks for the reply and glad that the issue is resolved. as mentioned in our docs Amplify Flutter supports minimum java version 17 when targeting android platform.
@alishawnee let me know if you are still facing this issue, otherwise I will be closing this as there is no action on our end.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Oct 17, 2024
@NikaHsn NikaHsn added the pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. label Oct 17, 2024
@NikaHsn NikaHsn added the pending-community-response Pending response from the issue opener or other community members label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category not-reproducible Issues that cannot be reproduced using the steps provided pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

5 participants