aws-amplify / amplify-ui-android

Amplify UI for Android is a collection of accessible, themeable, performant Android components that can connect directly to the cloud.
https://ui.docs.amplify.aws
Apache License 2.0
16 stars 8 forks source link

Not compatible with latest Androidx version #198

Open manas661 opened 1 month ago

manas661 commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

com.amplifyframework.ui:authenticator:1.0.0 is not working with latest compose bom library . It is only being compatable with androidx.compose.animation:animation:1.4.3 .And it is not working with any of the upper version.

We are faing this issue to implement amplify in Android:-

java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~6bhZICrgqVij99eBwBhVhA==/com.kotak.kotakpro.qa-b8N8K3H1VJQv0sX17v-0zQ==/base.apk) at com.amplifyframework.ui.authenticator.ui.AuthenticatorKt.Authenticator(Authenticator.kt:112)

To Reproduce A code sample or steps:


   Authenticator(
            signInContent = {
                Amplify.Auth.signIn(
                    "888888888888", "8888888888", { result ->
                        if (result.isSignedIn) {

                            Toast.makeText(context, "authenticated", Toast.LENGTH_SHORT).show()

                    } else {
                        Toast.makeText(context, "not authenticated", Toast.LENGTH_SHORT).show()
                    }
                }, {
                    startSensorEvent.value = true
                }
            )
        }
    ) {
     //content
    }

Which AWS service(s) are affected? amplify authenticator

mattcreaser commented 1 month ago

I've transfered this issue to the authenticator repsoitory.

@manas661 please confirm that you're using the latest version of Authenticator, 1.3.0. There was a fix around the animation libraries included back in 1.0.2.