hi-manshu / Kalendar

Kalendar is a powerful and customizable calendar library for Android applications. It provides a flexible and intuitive way to display and interact with calendars in your app. With Kalendar, you can easily render calendar views, handle date selection, pagination, and range selection, and customize the layout to match your app's design.
https://www.himanshoe.com
Apache License 2.0
818 stars 66 forks source link

Kalendar no static method AnimatedContent #166

Open PabloHermidaG opened 1 year ago

PabloHermidaG commented 1 year ago

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 commented 1 year ago

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

gsrathoreniks commented 1 year ago

Duplicate issue : #162

PabloHermidaG commented 1 year ago

Of course

Here is the proyect -> Mega

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

PabloHermidaG commented 1 year ago

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 commented 1 year ago

Any update?

hi-manshu commented 1 year ago

HeyHey! I will start working on this from next week. Thanks

On Sun, Nov 12, 2023 at 11:02 PM PabloHermidaG @.***> wrote:

Any update?

— Reply to this email directly, view it on GitHub https://github.com/hi-manshu/Kalendar/issues/166#issuecomment-1807253600, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKIRCUXZ32EA2QJFFG23OTYEFBQXAVCNFSM6AAAAAA6ZNQQD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGI2TGNRQGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

7FULL commented 1 year ago

Ok. Thank you

7FULL commented 1 year ago

Any update on this?

hugoolpz commented 1 year ago

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

chriszal commented 12 months ago

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

Unleashad commented 11 months ago

Hey same issue here, any update?

chriszal commented 11 months ago

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 commented 10 months ago

Any Update Bro?

7FULL commented 10 months ago

Any Update Bro?

Nope

SrujanHevin commented 8 months ago

@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 commented 5 months ago

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

JooHyunPark-JP commented 2 months ago

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?