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

java.lang.NoSuchMethodError: No static method AnimatedContent #113

Closed
2 tasks done
dyangelo-grullon opened this issue Jan 23, 2024 · 2 comments
Closed
2 tasks done
Labels
authenticator This issue relates to the Authenticator component

Comments

@dyangelo-grullon
Copy link

Before creating a new issue, please confirm:

Which UI component?

Authenticator

Gradle script dependencies

// Put output below this line
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
}

android {
    namespace = "xxxxxx" // omit
    compileSdk = 34

    defaultConfig {
        applicationId = "xxxxx"
        minSdk = 27
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
        isCoreLibraryDesugaringEnabled = true
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.1"
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
}

dependencies {

    implementation("androidx.core:core-ktx:1.10.1")
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
    implementation("androidx.activity:activity-compose:1.7.0")
    implementation(platform("androidx.compose:compose-bom:2023.08.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.ui:ui-graphics")
    implementation("androidx.compose.ui:ui-tooling-preview")
    implementation("androidx.compose.material3:material3")
    implementation("com.amplifyframework:core:2.14.6")
    implementation("com.amplifyframework:aws-auth-cognito:2.14.6")
    implementation("com.amplifyframework.ui:authenticator:1.0.1")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
    androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
    androidTestImplementation("androidx.compose.ui:ui-test-junit4")
    debugImplementation("androidx.compose.ui:ui-tooling")
    debugImplementation("androidx.compose.ui:ui-test-manifest")
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")

}

Environment information

# Put output below this line
------------------------------------------------------------
Gradle 8.2
------------------------------------------------------------

Build time:   2023-06-30 18:02:30 UTC
Revision:     5f4a070a62a31a17438ac998c2b849f4f6892877

Kotlin:       1.8.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          20.0.2 (Homebrew 20.0.2)
OS:           Mac OS X 13.3 x86_64


Please include any relevant guides or documentation you're referencing

No response

Describe the bug

Crash on use of authenticator in my app. Compose verison is higher than examples, and so is kotlin version. If support for newer versions of compose and kotlin are not supported (as evidenced by the error signature), then that should be documented. The documentation claims support for a version and up. This is up. If this is not the expectation, then this should be patched.

Reproduction steps (if applicable)

Android Studio Hedgehog | 2023.1.1 Patch 1

Run on Pixel 3a api 34

instant crash

Any usage of authenticator

Code Snippet

// Put your code below this line.

Log output

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/data/io.brandstake.flickflack/code_cache/.overlay/base.apk/classes.dex)
at com.amplifyframework.ui.authenticator.ui.AuthenticatorKt.Authenticator(Authenticator.kt:112)
at io.brandstake.flickflack.MainActivityKt$SampleAppContent$2.invoke(MainActivity.kt:105)
at io.brandstake.flickflack.MainActivityKt$SampleAppContent$2.invoke(MainActivity.kt:98)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:117)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:239)
at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:221)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)


amplifyconfiguration.json

n/a

Additional information and screenshots

No response

@mattcreaser mattcreaser added the authenticator This issue relates to the Authenticator component label Jan 23, 2024
@mattcreaser
Copy link
Member

Hi @dyangelo-grullon, looks like you are using Authenticator 1.0.1 - can you please try bumping this to 1.0.2. There was a change in the Material library's experimental animated content API that we included in this updated version. Thanks!

@dyangelo-grullon
Copy link
Author

ah sorry that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authenticator This issue relates to the Authenticator component
Projects
None yet
Development

No branches or pull requests

2 participants