You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Preview
@Composable
fun PreviewChannelsScreen() {
ChatClient.Builder("your-api-key", LocalContext.current.applicationContext).build()
ChannelsScreen()
}
But it does not work. Getting the error:
java.lang.ClassCastException: class com.android.layoutlib.bridge.android.ApplicationContext cannot be cast to class android.app.Application (com.android.layoutlib.bridge.android.ApplicationContext and android.app.Application are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @275626bf) at io.getstream.chat.android.client.notifications.handler.NotificationHandlerFactory.provideDefaultNotificationPermissionHandler(NotificationHandlerFactory.kt:148) at io.getstream.chat.android.client.notifications.handler.NotificationHandlerFactory.createNotificationHandler$default(NotificationHandlerFactory.kt:61) at io.getstream.chat.android.client.ChatClient$Builder.internalBuild(ChatClient.kt:3165)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have tried below approach
But it does not work. Getting the error:
Beta Was this translation helpful? Give feedback.
All reactions