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
When using rememberFilePickerLauncher, the previewer in the androidMain source set stops functioning because of a ClassCastException. During preview rendering, the LocalContext.current returns a mocked BridgeContext and not a ComponentActivity
Stack Trace
java.lang.ClassCastException: class com.android.layoutlib.bridge.android.BridgeContext cannot be cast to class androidx.activity.ComponentActivity (com.android.layoutlib.bridge.android.BridgeContext is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @5b4286a7; androidx.activity.ComponentActivity is in unnamed module of loader org.jetbrains.android.uipreview.StudioModuleClassLoader @57ee5812) at io.github.vinceglb.filekit.compose.FileKitCompose_androidKt.InitFileKit(FileKitCompose.android.kt:11) at io.github.vinceglb.filekit.compose.FileKitComposeKt.rememberFilePickerLauncher(FileKitCompose.kt:26)
The text was updated successfully, but these errors were encountered:
When using
rememberFilePickerLauncher
, the previewer in theandroidMain
source set stops functioning because of aClassCastException
. During preview rendering, theLocalContext.current
returns a mockedBridgeContext
and not aComponentActivity
Stack Trace
java.lang.ClassCastException: class com.android.layoutlib.bridge.android.BridgeContext cannot be cast to class androidx.activity.ComponentActivity (com.android.layoutlib.bridge.android.BridgeContext is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @5b4286a7; androidx.activity.ComponentActivity is in unnamed module of loader org.jetbrains.android.uipreview.StudioModuleClassLoader @57ee5812) at io.github.vinceglb.filekit.compose.FileKitCompose_androidKt.InitFileKit(FileKitCompose.android.kt:11) at io.github.vinceglb.filekit.compose.FileKitComposeKt.rememberFilePickerLauncher(FileKitCompose.kt:26)
The text was updated successfully, but these errors were encountered: