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 MainScreenPreview() { BindEffect(permissionsController) }
When run preview task for Android exception has been thrown: java.lang.ClassCastException: androidx.compose.ui.tooling.PreviewActivity cannot be cast to androidx.fragment.app.FragmentActivity at dev.icerock.moko.permissions.compose.BindEffect_androidKt$BindEffect$1.invokeSuspend(BindEffect.android.kt:24)
Reason of exception is cast context to FragmentActivity in BindEffect.
I don't know is there the way to use FragmentActivity to preview Composable. Now my solution is to add parameter to skip binding. It's bad for code readability. May be someone propose better solution?
The text was updated successfully, but these errors were encountered:
@Preview @Composable fun MainScreenPreview() { BindEffect(permissionsController) }
When run preview task for Android exception has been thrown:
java.lang.ClassCastException: androidx.compose.ui.tooling.PreviewActivity cannot be cast to androidx.fragment.app.FragmentActivity at dev.icerock.moko.permissions.compose.BindEffect_androidKt$BindEffect$1.invokeSuspend(BindEffect.android.kt:24)
Reason of exception is cast context to FragmentActivity in BindEffect.
I don't know is there the way to use FragmentActivity to preview Composable. Now my solution is to add parameter to skip binding. It's bad for code readability. May be someone propose better solution?
The text was updated successfully, but these errors were encountered: