org.koin.core.error.KoinAppAlreadyStartedException: Trying to run new Koin Application whereas Koin is already started. Use 'KoinContext()' instead of check for any 'startKoin' usage.
In ios whenever i rotate screen app is crashing and getting error but in android app is not crashing on rotate of screen,
Version
koin = "3.5.6"
koin-compose = "1.1.5"
Sample Code
In CommonMain
@Composable
fun App(context: Context) {
KoinApplication(application = {
modules(getSharedModules(context))
}) {
AppTheme {
var showContent by remember { mutableStateOf(false) }
org.koin.core.error.KoinAppAlreadyStartedException: Trying to run new Koin Application whereas Koin is already started. Use 'KoinContext()' instead of check for any 'startKoin' usage.
In ios whenever i rotate screen app is crashing and getting error but in android app is not crashing on rotate of screen,
Version
koin-compose = "1.1.5"
Sample Code
In CommonMain
@Composable fun App(context: Context) {
KoinApplication(application = { modules(getSharedModules(context)) }) { AppTheme { var showContent by remember { mutableStateOf(false) }
}
}
In SharedModule.kt file
fun getSharedModules(context: Context) = listOf(authModule(),homeModule(), datastoreModule(context), networkModule())