aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 242 forks source link

A problem occurred configuring project ':amplify_auth_cognito_android'. #5111

Closed anusrivas closed 1 month ago

anusrivas commented 2 months ago

Description

I keep getting following error

FAILURE: Build failed with an exception.

BUILD FAILED in 4s Error: Gradle task assembleDebug failed with exit code 1

Categories

Steps to Reproduce

on typing command flutter run

Screenshots

No response

Platforms

Flutter Version

3.19.6

Amplify Flutter Version

0.5.1

Deployment Method

Amplify CLI

Schema

No response

NikaHsn commented 2 months ago

@anusrivasWhat Gradle version are you currently using? Newer versions of the Android Gradle Plugin (AGP) required specifying a namespace within the module's build file. Given that Amplify Flutter v0 was developed with an older Gradle version, the namespace is not defined for this project. I recommend that you upgrade to Amplify Flutter version ^2.0.0, as v0.x is now in maintenance mode and will only receive critical bug fixes.

anusrivas commented 1 month ago

@NikaHsn - amplify flutter 2.2.0 is not compatible with json_annotation & json_serializable latest version, once I degraded them back to one version below and upgraded the amplify flutter it worked fine.

please look into this.

billdacat commented 1 month ago

Also having this issue.

Because (myproject) depends on amplify_core ^2.0.0 which depends on json_annotation >=4.8.1 <4.9.0, json_annotation >=4.8.1 <4.9.0 is required. So, because (myproject) depends on json_annotation ^4.9.0, version solving failed.

Jordan-Nelson commented 1 month ago

@NikaHsn - amplify flutter 2.2.0 is not compatible with json_annotation & json_serializable latest version, once I degraded them back to one version below and upgraded the amplify flutter it worked fine.

please look into this.

@anusrivas - Amplify Flutter does not yet support json_annotation v4.9. This seems to be a different issue/error than what you first reported. Is the original issue resolved?

Jordan-Nelson commented 1 month ago

I have opened https://github.com/aws-amplify/amplify-flutter/issues/5196 to track support for json_annotation v4.9. If the original issue is not longer reproducible I will close this out and we can use the other issue to track json_annotation v4.9. Thanks.

Jordan-Nelson commented 1 month ago

I am closing this out since it sounds like this issue is resolved by upgrading to the latest version of amplify, and we have separate issue tracking support for json_annotation v4.9.