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

Kalendar no static method AnimatedContent #166

Open
PabloHermidaG opened this issue Nov 1, 2023 · 17 comments
Open

Kalendar no static method AnimatedContent #166

PabloHermidaG opened this issue Nov 1, 2023 · 17 comments

Comments

@PabloHermidaG
Copy link

Basically when trying to create a kalendar this error PopUps

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/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
                                                                                                    	at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
                                                                                                    	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
                                                                                                    	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
                                                                                                    	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)

I just did this: Kalendar(currentDay = LocalDate(1,1,1), kalendarType = KalendarType.Oceanic)

Full error log


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/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
                                                                                                   	at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
                                                                                                   	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
                                                                                                   	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
                                                                                                   	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:59)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:56)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:132)
                                                                                                   	at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:114)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.SurfaceKt.Surface-T9BRK9s(Surface.kt:111)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:53)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:52)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:360)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:73)
                                                                                                   	at com.full.crm.ui.theme.ThemeKt.CRMTheme(Theme.kt:65)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:52)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:51)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
                                                                                                   	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
                                                                                                   	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:195)
2023-11-01 15:44:29.303 14534-14534 AndroidRuntime          com.full.crm                         E  	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
                                                                                                   	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:158)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:157)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:157)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:142)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
                                                                                                   	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3340)
                                                                                                   	at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3273)
                                                                                                   	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:588)
                                                                                                   	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1013)
                                                                                                   	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:183)
                                                                                                   	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
                                                                                                   	at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1266)
                                                                                                   	at android.view.View.dispatchAttachedToWindow(View.java:21980)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3014)
                                                                                                   	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
                                                                                                   	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
                                                                                                   	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
                                                                                                   	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
                                                                                                   	at android.view.Choreographer.doCallbacks(Choreographer.java:952)
                                                                                                   	at android.view.Choreographer.doFrame(Choreographer.java:882)
2023-11-01 15:44:29.304 14534-14534 AndroidRuntime          com.full.crm                         E  	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
                                                                                                   	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                   	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                   	at android.os.Looper.loopOnce(Looper.java:205)
                                                                                                   	at android.os.Looper.loop(Looper.java:294)
                                                                                                   	at android.app.ActivityThread.main(ActivityThread.java:8177)
                                                                                                   	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                   	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
                                                                                                   	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
@gsrathoreniks
Copy link
Contributor

@PabloHermidaG Can you please share a sample project to reproduce this?

@gsrathoreniks
Copy link
Contributor

Duplicate issue : #162

@PabloHermidaG
Copy link
Author

Of course

Here is the proyect -> Mega

Just by calling a simple kalendar in the main activity throws that

@PabloHermidaG
Copy link
Author

I have receiver a mail where you tell me you cant acces the file but I dont see the comment.

https://mega.nz/file/u5EHFZDZ#ncf7MgY687JLkwKIby6Tqt5XKjX84JidnpTHP3OJorY

@PabloHermidaG
Copy link
Author

Any update?

@hi-manshu
Copy link
Owner

hi-manshu commented Nov 17, 2023 via email

@7FULL
Copy link

7FULL commented Nov 18, 2023

Ok. Thank you

@7FULL
Copy link

7FULL commented Nov 23, 2023

Any update on this?

@hugoolpz
Copy link

Hey man I have the same problem, is there any update to this issue?

@chriszal
Copy link

chriszal commented Dec 7, 2023

Have the same issue here as soon as I updated from material to material3 on my project. Any updates?

@Unleashad
Copy link

Hey same issue here, any update?

@chriszal
Copy link

I've changed so many compose versions to make this work but it still has the same error please can you provide with some feedback on this issue @hi-manshu

@rohitjakhar
Copy link

Any Update Bro?

@7FULL
Copy link

7FULL commented Feb 5, 2024

Any Update Bro?

Nope

@SrujanHevin
Copy link

SrujanHevin commented Mar 13, 2024

@composable
fun CalmMindScreen(navController: NavHostController) {

val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route

Column(
    modifier = Modifier
        .fillMaxSize()
        .background(color = Color.White)
        .wrapContentSize(),
    verticalArrangement = Arrangement.Center,
    horizontalAlignment = Alignment.CenterHorizontally
) {
    Kalendar(
        currentDay = LocalDate(2024,2,28),
        modifier = Modifier
            .fillMaxWidth()
            .height(400.dp),
        kalendarType = KalendarType.Firey,
        showLabel = true,
        events = KalendarEvents(),
        kalendarHeaderTextKonfig = KalendarTextKonfig(kalendarTextSize = 16.sp, kalendarTextColor = Color.Black),
        kalendarColors = KalendarColors.default(),
        kalendarDayKonfig = KalendarDayKonfig.default(),
        daySelectionMode = DaySelectionMode.Single,
        dayContent = null,
        headerContent = null,
        onDayClick = { _,_ ->
            // Handle day click event
        },
        onRangeSelected = {_,_ ->
            // Handle range selection event
        },
        onErrorRangeSelected = {
            // Handle error
        })

}

just run this screen you can recreate the error @hi-manshu and also use material3

@CallumMarksClik
Copy link

Any update on this? I am also having the same issues using Material3

@JooHyunPark-JP
Copy link

Yes, same issue for me too. I am using Material 3 as well. I assume the problem is likely because of using Material 3?
Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests