https://kotlinlang.org logo
Title
s

Sunil Kumar

05/16/2023, 4:57 AM
Hi , i am using voyager for navigation and tab navigation, after integrating and seting up tabs, i m getting following error while running it for 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/~~y0Qj1DhndsLmERz8X6SoqQ==/com.codingambitions.composeinstagramclone-HrJNYdo1sTC_110Bp3HSmg==/base.apk)
                 	at cafe.adriel.voyager.transitions.ScreenTransitionKt.ScreenTransition(ScreenTransition.kt:46)
                 	at cafe.adriel.voyager.transitions.SlideTransitionKt.SlideTransition(SlideTransition.kt:31)
                 	at features.app.bottomtabs.ComposableSingletons$TabContentKt$lambda-1$1.invoke(TabContent.kt:36)
                 	at features.app.bottomtabs.ComposableSingletons$TabContentKt$lambda-1$1.invoke(TabContent.kt:35)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                 	at cafe.adriel.voyager.navigator.NavigatorKt$Navigator$6$1.invoke(Navigator.kt:96)
                 	at cafe.adriel.voyager.navigator.NavigatorKt$Navigator$6$1.invoke(Navigator.kt:89)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                 	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                 	at cafe.adriel.voyager.navigator.NavigatorKt$Navigator$6.invoke(Navigator.kt:87)
                 	at cafe.adriel.voyager.navigator.NavigatorKt$Navigator$6.invoke(Navigator.kt:80)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
                 	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                 	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                 	at cafe.adriel.voyager.navigator.NavigatorKt.Navigator(Navigator.kt:78)
                 	at cafe.adriel.voyager.navigator.NavigatorKt.Navigator(Navigator.kt:58)
                 	at features.app.bottomtabs.TabContentKt.TabContent(TabContent.kt:35)
                 	at features.app.bottomtabs.HomeTab.Content(HomeTab.kt:29)
@Adriel Café Is this a bug or any workaround available?
And similarily getting this error for ios build after using voyager:
error: There are still 6 unbound symbols after generation of IR module <shared>:
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: cafe.adriel.voyager.navigator.tab/Tab.icon.<get-icon>|-5764684600227404327[0]
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: cafe.adriel.voyager.navigator.tab/Tab.options.<get-options>|7766868889533212780[0]
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: cafe.adriel.voyager.navigator.tab/Tab.title.<get-title>|371973571756195065[0]
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: androidx.compose.foundation.lazy/LazyListScope.item|-2398404341226065315[0]
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: androidx.compose.foundation.lazy/LazyListScope.items|8564101490881923997[0]
Unbound public symbol IrSimpleFunctionPublicSymbolImpl: androidx.compose.foundation.lazy/LazyListScope.stickyHeader|431226128286809998[0]

This could happen if there are two libraries, where one library was compiled against the different version of the other library than the one currently used in the project. Please check that the project configuration is correct and has consistent versions of dependencies.
error: Compilation finished with errors
t

Tolriq

05/16/2023, 6:08 AM
Don't use Compose 1.5 or at least do not use the Transition package and copy paste the code.
s

Sunil Kumar

05/16/2023, 1:31 PM
hi now i am using 1.4.0 compose, and now android side error is gone, its working for android, but for ios side, its not working, still same error as above.