Koin - a pragmatic lightweight dependency injection framework for Kotlin

Overview

logo

What is KOIN? - https://insert-koin.io

A pragmatic lightweight dependency injection framework for Kotlin developers.

Koin is a DSL, a light container and a pragmatic API

Latest Version 🚀

Maven Central

The koin project's maven group id was previously org.koin. It's now io.insert-koin on maven central

You can find the following page to help setup your project: Koin Gradle Setup

// latest version (Maven Central)
// New group id moved from `org.koin` to `io.insert-koin`

// 2.x Branch
koin_version = '2.2.3'
// 3.x branch
koin_version = '3.1.1'

Where to find resources? 🌐

Latest News

Getting Help

Any question about Koin usage?

Reporting issues

Found a bug or a problem on a specific feature? Open an issue on Github issues

Contributing 🛠

Want to help or share a proposal about Koin? problem on a specific feature?

  • Open an issue to explain the issue you want to solve Open an issue
  • Come talk on slack #koin-dev channel
  • After discussion to validate your ideas, you can open a PR or even a draft PR if the contribution is a big one Current PRs

Additional readings about basic setup: https://github.com/InsertKoinIO/koin/blob/master/CONTRIBUTING.adoc

Contributors

This project exists thanks to all the people who contribute. [Contribute].

OpenCollective

Backers on Open Collective Sponsors on Open Collective

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Comments
  • Injection of ViewModels scoped to navGraphViewModels()

    Injection of ViewModels scoped to navGraphViewModels()

    Is your feature request related to a problem? Please describe. With version androidx.navigation:*:2.1.0-alpha02 it is possible to scope view models to a navigation subgraph which makes it easier to have shared view models for specific parts of an application flow. To get a view model scoped to a specific navigation graph you call

    val viewModel : ViewModel by navGraphViewModels(R.id.nav_graph)
    

    This is not compatible with Koins by viewModel() or by sharedViewModel() and so the view model can not be injected as expected.

    Describe the solution you'd like An additional Koin api call which makes it possible to get a view model scoped to the navigation graph in the same way it is possible through by viewModel() or by sharedViewModel()

    Describe alternatives you've considered The by navGraphViewModels() call has an optional factory parameter, currently I create an additional custom ViewModelFactory which I inject and provide. The downside is now I have to maintain the dependencies of the ViewModel also in the factory and not just in the modules.kt

        private val factory: MyViewModelFactory by inject()
        private val viewModel: ViewModel by navGraphViewModels(R.id.nav_graph){
            factory
        }
    

    I have also hacked together seeming version from your library code:

    inline fun <reified T : ViewModel> Fragment.sharedGraphViewModel(
        graphId: Int,
        key: String? = null,
        name: String? = null,
        noinline parameters: ParameterDefinition = emptyParameterDefinition()
    ): Lazy<T> {
        return lazy {
            val from: ViewModelStore =
                findNavController().getViewModelStore(graphId)
            Koin.logger.debug("[ViewModel] ~ '${T::class}'(name:'$name' key:'$key') - $this")
            val clazz: KClass<T> = T::class
    
            val viewModelProvider =
                ViewModelProvider(
                    from,
                    object : ViewModelProvider.Factory, KoinComponent {
                        override fun <T : ViewModel> create(modelClass: Class<T>): T {
                            return get(name ?: "", clazz, parameters = parameters)
                        }
                    })
            if (key != null) {
                viewModelProvider.get(key, clazz.java)
            } else {
                viewModelProvider.get(clazz.java)
            }
        }
    }
    
    

    Target Koin project AndroidX

    android type:feature-proposal important 🔥 
    opened by stephen-marc 45
  • Crash in Koin 3.1.3:

    Crash in Koin 3.1.3: "SavedStateProvider with the given key is already registered"

    Describe the bug When upgrading from Koin 3.1.2 to 3.1.3 we started getting some crashes in our app. We do not know for sure if Koin is at fault, but the stack trace implies it:

    Fatal Exception: java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
           at androidx.savedstate.SavedStateRegistry.registerSavedStateProvider(SavedStateRegistry.java:111)
           at androidx.lifecycle.SavedStateHandleController.attachToLifecycle(SavedStateHandleController.java:50)
           at androidx.lifecycle.SavedStateHandleController.create(SavedStateHandleController.java:70)
           at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:67)
           at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:169)
           at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:139)
           at org.koin.androidx.viewmodel.ViewModelResolverKt.resolveInstance(ViewModelResolverKt.java:15)
           at org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel(ScopeExtKt.java:65)
           at org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel(ScopeExtKt.java:52)
           at org.koin.androidx.viewmodel.ext.android.ComponentCallbackExtKt.getViewModel(ComponentCallbackExtKt.java:61)
           at org.koin.androidx.viewmodel.ext.android.ComponentCallbackExtKt.getViewModel$default(ComponentCallbackExtKt.java:54)
           at org.koin.androidx.viewmodel.ext.android.ComponentCallbackExtKt.getViewModel$default(ComponentCallbackExtKt.java:50)
           at com.action.consumerapp.feature.search.ProductSearchFragment$special$$inlined$viewModel$default$1.invoke(ProductSearchFragment.java:63)
           at com.action.consumerapp.feature.search.ProductSearchFragment$special$$inlined$viewModel$default$1.invoke(ProductSearchFragment.java:41)
           at kotlin.UnsafeLazyImpl.getValue(UnsafeLazyImpl.java:81)
           at com.action.consumerapp.feature.search.ProductSearchFragment.getViewModel(ProductSearchFragment.java:52)
           at com.action.consumerapp.feature.search.ProductSearchFragment.onDestroy(ProductSearchFragment.java:100)
           at androidx.fragment.app.Fragment.performDestroy(Fragment.java:3217)
           at androidx.fragment.app.FragmentStateManager.destroy(FragmentStateManager.java:756)
           at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:333)
           at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1788)
           at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1721)
           at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1658)
           at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:488)
           at android.os.Handler.handleCallback(Handler.java:883)
           at android.os.Handler.dispatchMessage(Handler.java:100)
           at android.os.Looper.loop(Looper.java:241)
           at android.app.ActivityThread.main(ActivityThread.java:7604)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
    

    To Reproduce Unfortunately, we have not been able to reproduce the issue ourselves.

    Expected behavior The app should not crash.

    Koin project used and used version (please complete the following information): io.insert-koin:koin-android:3.1.3

    Additional moduleDefinition We use viewModel { in our module and by viewModel() in our fragments/activities. Could this change from the changelog be related? "[DEPRECATED] [android] - by stateViewModel() is deprecated. state parameter is not needed anymore. It's now merged into viewModel(), to inject SavedStateHandle"

    android type:issue status:accepted important 🔥 
    opened by andersu 37
  • No definition found for class:'androidx.lifecycle.SavedStateHandle'

    No definition found for class:'androidx.lifecycle.SavedStateHandle'

    I'm using new Koin version 2.2.1 and I'm getting runtime error in viewmodel where i'm using SavedStateHandle In previous version 2.1.6 all was fine. I used savedStateViewModel, now i'm getting crash after migration

    all I did acording to article, maybe something are missed there? https://doc.insert-koin.io/#/koin-android/viewmodel?id=viewmodel-and-state-bundle

    Caused by: org.koin.core.error.NoBeanDefFoundException: No definition found for class:'androidx.lifecycle.SavedStateHandle'. Check your definitions! at org.koin.core.scope.Scope.throwDefinitionNotFound(Scope.kt:282) at org.koin.core.scope.Scope.resolveInstance(Scope.kt:251) at org.koin.core.scope.Scope.get(Scope.kt:204) at com.grument.laika.di.DiManager$module$1$19.invoke(DiManager.kt:76) at com.grument.laika.di.DiManager$module$1$19.invoke(DiManager.kt:35) at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:53) at org.koin.core.instance.FactoryInstanceFactory.get(FactoryInstanceFactory.kt:36)  at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:103)  at org.koin.core.scope.Scope.resolveInstance(Scope.kt:236)  at org.koin.core.scope.Scope.get(Scope.kt:204)  at org.koin.androidx.viewmodel.factory.StateViewModelFactory.create(StateViewModelFactory.kt:21)  at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:69)  at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)  at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)  at org.koin.androidx.viewmodel.ViewModelResolverKt.get(ViewModelResolver.kt:23)  at org.koin.androidx.viewmodel.ViewModelResolverKt.resolveInstance(ViewModelResolver.kt:12)  at org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel(ScopeExt.kt:86)  at org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel(ScopeExt.kt:72)  at org.koin.androidx.viewmodel.koin.KoinExtKt.getViewModel(KoinExt.kt:41)  at org.koin.androidx.viewmodel.ext.android.FragmentExtKt.getViewModel(FragmentExt.kt:71)  at com.grument.laika.view.transfer.StyleTransferFragment$$special$$inlined$viewModel$2.invoke(FragmentExt.kt:73)  at com.grument.laika.view.transfer.StyleTransferFragment$$special$$inlined$viewModel$2.invoke(Unknown Source:0)  at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:81)  at com.grument.laika.view.transfer.StyleTransferFragment.getViewModel(Unknown Source:2)  at com.grument.laika.view.transfer.StyleTransferFragment.initObservers(StyleTransferFragment.kt:101)  at com.grument.laika.view.transfer.StyleTransferFragment.onViewCreated(StyleTransferFragment.kt:42)  at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:332)  at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1199)  at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:2236)  at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2009)  at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1965)  at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1861)  at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)  at android.os.Handler.handleCallback(Handler.java:938)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:223)  at android.app.ActivityThread.main(ActivityThread.java:7656)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 

    in module viewModel { (image: File) -> StyleTransferViewModel(context = androidContext(), repository = get(), modelManager = get(), state = get(), image = image) }

    the class where i'm injecting class StyleTransferViewModel(private val context: Context, private val repository: Repository, private val modelManager: ModelManager, state: SavedStateHandle, image: File) : CommonViewModel(repository)

    in fragment private val viewModel: StyleTransferViewModel by viewModel{ parametersOf(args.image) }

    Koin project used and used version (please complete the following information): [e.g]: koin-core version 2.2.1

    Any help apreciated

    android type:issue status:checking documentation 
    opened by OleksandrGrument 34
  • Is there a way to have a sharedViewModel for a Fragment's Scope?

    Is there a way to have a sharedViewModel for a Fragment's Scope?

    I'm using Android Navigation Component, in a Single-Activity App, there is a ViewModel that I want to be re-created and it's shared between some DialogFragments that compose this specific flow. I want to know if there is a way to have a sharedViewModel tied to this FragmentScope

    I would like to use a Scoped sharedViewModel, I think that this will improve the library capacities

    As an alternative, I would like to know if there is a way to clear a viewModel instance when the fragment is destroyed

    koin-android

    opened by arctouch-carlosottoboni 34
  • [Koin 3.0] Multiplatform

    [Koin 3.0] Multiplatform

    Is your feature request related to a problem? Please describe. Koin Suppor for this platforms can be discussed in this Ticket:

    • Kotlin/Native Linux/OSX/Windows
    • Kotlin/Native iOS
    • Kotlin/Native Android
    • Kotlin/JS Browser
    • Kotlin/JS Node

    Describe the solution you'd like Koin should support for other platforms.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Target Koin project Koin Core and Koin Test, maybe others

    type:contribution 
    opened by drieks 33
  • Inject Activity

    Inject Activity

    Hi,

    Koin is awesome but I'm having an issue. Some libraries, like Firebase Analytics, depend on the current Activity to perform some actions like setting a current screen.

    class Analytics(private val activity: Activity) {
    
      private val firebaseAnalytics: FirebaseAnalytics = FirebaseAnalytics.getInstance(activity)
    
      fun setCurrentScreen(screenName: String) {
        firebaseAnalytics.setCurrentScreen(activity, screenName, null)
      }
    }
    
    class MainPresenter(analytics: Analytics) { 
        
    }
    
    class MainActivity : AppCompatActivity() {
    
      val presenter : MainPresenter by inject()
    
    }
    

    Is this possible with Koin? If yes, then I don't see how.

    opened by stanete 30
  • 2.2.0 breaks backwards compatibility and adds clutter by enforcing @KoinApiExtension

    2.2.0 breaks backwards compatibility and adds clutter by enforcing @KoinApiExtension

    When migrating from v2.1.6 to 2.2rc3, classes that use koin do not need only implement KoinComponent as before, but are also now required to be annotated with @KoinApiExtension. The intent is not clear.

    The required annotation makes it considerably more cumbersome to use koin (which worked just great previously) for library development, where users will sub-class core types that are built on top of KoinComponent.

    As an example, see https://github.com/holgerbrandl/kalasim/blob/9cbbf4ce6d9dff063ae9a667b42908c59bc4cd65/src/test/kotlin/org/github/holgerbrandl/kalasim/examples/kalasim/Refuel.kt#L74 where the user now has to tag each custom type (e.g. GasStation) to be resolved via koin in the simulation with an extra @KoinApiExtension.

    It would be great if koin could still support the main mode of operation which is implementing KoinComponent without an additional mandatory flag on all child-classes.

    core type:issue status:checking important 🔥 
    opened by holgerbrandl 28
  • Cannot resolve viewModel injection with delegate style declaration

    Cannot resolve viewModel injection with delegate style declaration

    I'm trying to follow the documentation using delegate style declaration of ViewModels but I cannot resolve the import in Android Studio. screen shot 2018-02-16 at 18 05 14

    This is my code: screen shot 2018-02-16 at 18 07 08

    What I'm doing wrong? Any advice is appreciated.

    opened by shrpereira 27
  • Does not support Kotlin 1.6.0

    Does not support Kotlin 1.6.0

    Describe the bug Latest koin version producesNoSuchMethodErrors at runtime when using kotlin 1.6.0-RC

    To Reproduce Steps to reproduce the behavior:

    1. Add latest stable koin dependency
    2. Use kotlin 1.6.0-RC.
    3. App crashes on startup in 100% cases

    Expected behavior The app is able to run without crashing.

    Koin project used and used version (please complete the following information): [e.g]: koin version 3.1.2, kotlin 1.6.0-RC

    The surest way to get a runtime error is to call a deleted method toDouble() of kotlin.duration that was removed in 1.6.0 by using

    startKoin {
                androidContext(applicationContext)
                androidLogger() //This one is causing the crash
                modules(/* blah */)
            }
    

    Stacktrace:

    java.lang.NoSuchMethodError: No static method toDouble-impl(JLjava/util/concurrent/TimeUnit;)D in class Lkotlin/time/Duration; or its super classes (declaration of 'kotlin.time.Duration' appears in /data/app/~~RAEJCWfLUZeoA5jJfJMmtA==/com.nek.test.debug-jvqFgZyETecELyVm71SR5A==/base.apk!classes16.dex)
            at org.koin.core.time.MeasureKt.measureDuration(Measure.kt:32)
            at org.koin.core.KoinApplication.modules(KoinApplication.kt:59)
            at org.koin.core.KoinApplication.modules(KoinApplication.kt:50)
            at com.nek.test.TestApplication$onCreate$1.invoke(TestApplication.kt:30)
            at com.nek.test.TestApplication$onCreate$1.invoke(TestApplication.kt:27)
            at org.koin.core.context.GlobalContext.startKoin(GlobalContext.kt:64)
            at org.koin.core.context.DefaultContextExtKt.startKoin(DefaultContextExt.kt:31)
            at com.nek.test.TestApplication.onCreate(TestApplication.kt:27)
        //bunch of junk    
    

    Lesson: do not use experimental APIs

    core important 🔥 
    opened by Nek-12 26
  • [Crash] Koin Logger Measure and Kotlin EAP 1.4-M3

    [Crash] Koin Logger Measure and Kotlin EAP 1.4-M3

    Describe the bug This is just a heads up on Koin and Kotlin EAP 1.4-M3.

    After upgrading to Kotlin EAP 1.4-M3 (from previous Kotlin EAP 1.4-M2) when launching the app a NoSuchMethodException exception is thrown due to the elapseNow() experimental method.

    Full exception below:

        java.lang.NoSuchMethodError: No virtual method elapsedNow()D in class Lkotlin/time/TimeMark; or its super classes (declaration of 'kotlin.time.TimeMark' appears in /data/app/io.petros.movies-u-dzv9wkMPKfx19uLVQWyg==/base.apk)
            at org.koin.core.time.MeasureKt.measureDuration(Measure.kt:36)
            at org.koin.core.KoinApplication.modules(KoinApplication.kt:60)
            at io.petros.movies.app.App$initKoin$1.invoke(App.kt:45)
            at io.petros.movies.app.App$initKoin$1.invoke(App.kt:23)
            at org.koin.core.context.ContextFunctionsKt.startKoin(ContextFunctions.kt:39)
            at org.koin.core.context.ContextFunctionsKt.startKoin$default(ContextFunctions.kt:35)
            at io.petros.movies.app.App.initKoin(App.kt:42)
            at io.petros.movies.app.App.onCreate(App.kt:34)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
            at android.app.ActivityThread.access$1300(ActivityThread.java:219)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
            at android.os.Handler.dispatchMessage(Handler.java:107)
            at android.os.Looper.loop(Looper.java:214)
            at android.app.ActivityThread.main(ActivityThread.java:7356)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    

    This is due to the fact that my app is using androidLogger(), which default to a Koin log level of Level.INFO and as such when modules are build the duration is measured, which crashes the app. To overcome this I disabled logging for now, but it will be good if that get fixed so that I can enable it again.

    To Reproduce Steps to reproduce the behavior:

    1. Use Kotlin EAP 1.4-M3 as a dependency in your app (or project)
    2. During Koin init start with default logging enabled (Level.INFO)
    3. Launch your app (or project)
    4. See error

    Expected behavior I except the app to not crash.

    Koin project used and used version (please complete the following information): org.jetbrains.kotlin:kotlin-stdlib:1.4-M3 org.koin:koin-core:2.1.6 org.koin:koin-android:2.1.6 org.koin:koin-androidx-viewmodel:2.1.6

    Additional moduleDefinition No additional moduleDefinition.

    core type:issue status:accepted 
    opened by ParaskP7 26
  • Publish to Maven Central?

    Publish to Maven Central?

    Starting from May 1, 2021 JCenter will stop working. I was looking for official Koin artifacts in Maven Central and didn't find any, only some repackaged ones. Do you publish only to JCenter? Are there any plans to move away?

    Describe the solution you'd like Official Koin artifacts should be available outside of JCenter, preferably in Maven Central.

    Describe alternatives you've considered

    Target Koin project All of them.

    status:accepted status:checking important 🔥 
    opened by madhead 25
  • Could not find koin-core.klib for `iosArm32` target platform

    Could not find koin-core.klib for `iosArm32` target platform

    Describe the bug The koin-core-iosarm32-3.3.2.klib file is missing in the maven central repository. The following error is generated when using the iosArm32 target:

    * What went wrong:
    Execution failed for task ':core:compileKotlinIosArm32'.
    > Could not resolve all files for configuration ':core:iosArm32CompileKlibraries'.
       > Could not find koin-core.klib (io.insert-koin:koin-core-iosarm32:3.3.2).
         Searched in the following locations:
             https://repo.maven.apache.org/maven2/io/insert-koin/koin-core-iosarm32/3.3.2/koin-core-iosarm32-3.3.2.klib
    

    To Reproduce Steps to reproduce the behavior:

    1. Create a kotlin multiplatform project
    2. Enable the iosArm32() target platform
    3. Sync the project and get the error

    Expected behavior The sync project without failure

    Koin project used and used version (please complete the following information): koin-core version 3.3.2

    Additional moduleDefinition

    opened by nicolasfara 0
  • Crash: NoClassDefFoundError: KoinDefinition on 3.2.2

    Crash: NoClassDefFoundError: KoinDefinition on 3.2.2

    Describe the bug Application crashes on startup after upgrading to dependencies specified below with the stacktrace

    Exception in thread "main" java.lang.NoClassDefFoundError: org/koin/core/definition/KoinDefinition
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:82)
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:20)
    	at org.koin.dsl.ModuleDSLKt.module(ModuleDSL.kt:37)
    	at org.koin.dsl.ModuleDSLKt.module$default(ModuleDSL.kt:35)
    	at com.test.di.AppModuleKt.appModule(AppModule.kt:20)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:11)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:10)
    	at io.ktor.server.application.CreatePluginUtilsKt.createPluginInstance(CreatePluginUtils.kt:159)
    	at io.ktor.server.application.CreatePluginUtilsKt.access$createPluginInstance(CreatePluginUtils.kt:1)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:46)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:39)
    	at io.ktor.server.application.ApplicationPluginKt.install(ApplicationPlugin.kt:98)
    	at com.test.view.plugins.KoinKt.configureKoin(Koin.kt:10)
    	at com.test.ApplicationKt.module(Application.kt:21)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)
    	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)
    	at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:119)
    	at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:36)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:335)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartupFor(ApplicationEngineEnvironmentReloading.kt:359)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.launchModuleByName(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.access$launchModuleByName(ApplicationEngineEnvironmentReloading.kt:32)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:315)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartup(ApplicationEngineEnvironmentReloading.kt:341)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:150)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:280)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invokeSuspend(CIOApplicationEngine.kt:157)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
    	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1.invokeSuspend(CIOApplicationEngine.kt:156)
    	(Coroutine boundary)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1.invokeSuspend(CIOApplicationEngine.kt:156)
    	at io.ktor.server.cio.CIOApplicationEngine$start$1.invokeSuspend(CIOApplicationEngine.kt:59)
    Caused by: java.lang.NoClassDefFoundError: org/koin/core/definition/KoinDefinition
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:82)
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:20)
    	at org.koin.dsl.ModuleDSLKt.module(ModuleDSL.kt:37)
    	at org.koin.dsl.ModuleDSLKt.module$default(ModuleDSL.kt:35)
    	at com.test.di.AppModuleKt.appModule(AppModule.kt:20)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:11)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:10)
    	at io.ktor.server.application.CreatePluginUtilsKt.createPluginInstance(CreatePluginUtils.kt:159)
    	at io.ktor.server.application.CreatePluginUtilsKt.access$createPluginInstance(CreatePluginUtils.kt:1)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:46)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:39)
    	at io.ktor.server.application.ApplicationPluginKt.install(ApplicationPlugin.kt:98)
    	at com.test.view.plugins.KoinKt.configureKoin(Koin.kt:10)
    	at com.test.ApplicationKt.module(Application.kt:21)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)
    	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)
    	at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:119)
    	at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:36)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:335)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartupFor(ApplicationEngineEnvironmentReloading.kt:359)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.launchModuleByName(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.access$launchModuleByName(ApplicationEngineEnvironmentReloading.kt:32)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:315)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartup(ApplicationEngineEnvironmentReloading.kt:341)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:150)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:280)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invokeSuspend(CIOApplicationEngine.kt:157)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
    	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1.invokeSuspend(CIOApplicationEngine.kt:156)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    Caused by: java.lang.ClassNotFoundException: org.koin.core.definition.KoinDefinition
    	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    	at io.ktor.server.engine.OverridingClassLoader$ChildURLClassLoader.findClass(OverridingClassLoader.kt:50)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    	... 51 more
    Exception in thread "DefaultDispatcher-worker-1 @coroutine#2" java.lang.NoClassDefFoundError: org/koin/core/definition/KoinDefinition
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:82)
    	at com.test.di.AppModuleKt$appModule$1.invoke(AppModule.kt:20)
    	at org.koin.dsl.ModuleDSLKt.module(ModuleDSL.kt:37)
    	at org.koin.dsl.ModuleDSLKt.module$default(ModuleDSL.kt:35)
    	at com.test.di.AppModuleKt.appModule(AppModule.kt:20)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:11)
    	at com.test.view.plugins.KoinKt$configureKoin$1.invoke(Koin.kt:10)
    	at io.ktor.server.application.CreatePluginUtilsKt.createPluginInstance(CreatePluginUtils.kt:159)
    	at io.ktor.server.application.CreatePluginUtilsKt.access$createPluginInstance(CreatePluginUtils.kt:1)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:46)
    	at io.ktor.server.application.CreatePluginUtilsKt$createApplicationPlugin$1.install(CreatePluginUtils.kt:39)
    	at io.ktor.server.application.ApplicationPluginKt.install(ApplicationPlugin.kt:98)
    	at com.test.view.plugins.KoinKt.configureKoin(Koin.kt:10)
    	at com.test.ApplicationKt.module(Application.kt:21)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
    	at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)
    	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
    	at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)
    	at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:119)
    	at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:36)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:335)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartupFor(ApplicationEngineEnvironmentReloading.kt:359)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.launchModuleByName(ApplicationEngineEnvironmentReloading.kt:334)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.access$launchModuleByName(ApplicationEngineEnvironmentReloading.kt:32)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:315)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartup(ApplicationEngineEnvironmentReloading.kt:341)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:313)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:150)
    	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:280)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invokeSuspend(CIOApplicationEngine.kt:157)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1$2.invoke(CIOApplicationEngine.kt)
    	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
    	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1.invokeSuspend(CIOApplicationEngine.kt:156)
    	(Coroutine boundary)
    	at io.ktor.server.cio.CIOApplicationEngine$initServerJob$1.invokeSuspend(CIOApplicationEngine.kt:156)
    

    To Reproduce Steps to reproduce the behavior: Use dependencies specified below in a Ktor server application, start the application.

    Expected behavior No crash

    Koin project used and used version (please complete the following information):

    io-insert-koin = "3.2.2"
    kotlin = "1.7.21"
    ktor = "2.1.3"
    log4j = "2.19.0"
    

    Additional moduleDefinition Crashes is happening before the first dependency gets resolved

    opened by Nek-12 1
  • Undocumented breaking change in scoped {}

    Undocumented breaking change in scoped {}

    Describe the bug Koin 3.3.1 update introduced a compile-time error when using singleOf() inside the scope<>() function. An undocumented change (not in CHANGELOG.md) was to change singleOf() to scopedOf() However, using scopedOf() results in DefinitionNotFound exception in runtime now.

    Expected behavior No breaking api changes are introduced in minor version update (x.x.Y)

    Koin project used and used version (please complete the following information): Koin 3.3.1

    Additional moduleDefinition

    scope<MainActivity> {
            scopedOf(::Formatters) { // was singleOf() and failed
                createdAtStart()
            }
        }
    
    opened by Nek-12 0
  • viewModelOf constructor DSL functions for 10+ parameters were removed

    viewModelOf constructor DSL functions for 10+ parameters were removed

    viewModelOf constructor DSL functions for 10+ parameters introduced on Dec 13 https://github.com/InsertKoinIO/koin/commit/e5bd2d92970b245eba6c3f775f15a5eda61b2d92#diff-b76c02b40b7312b21ceedf04bde2261f77a8e584f37743a86bb3b3ae74e55733 seems to be removed accidentally on Dec 14 https://github.com/InsertKoinIO/koin/commit/91397a91ea6e2f56b8e59e9c59d4bb7ddd754092#diff-b76c02b40b7312b21ceedf04bde2261f77a8e584f37743a86bb3b3ae74e55733

    opened by xsveda 0
  • androidContext crashes version 3.3.0

    androidContext crashes version 3.3.0

    Describe the bug Koin is crashing when trying to call androidContext:

    
    class App : Application() {
        override fun onCreate() {
            super.onCreate()
            initKoin(this)
        }
    }
    
    internal fun initKoin(context: Context) = startKoin {
        androidContext(context) // THIS CRASHES
        modules(
            gatewayModule(),
            repositoryModule(),
            interactorsModule(),
        )
    }
    

    Stacktace:

    java.lang.NoSuchMethodError: No static method binds(Lkotlin/Pair;[Lkotlin/reflect/KClass;)Lkotlin/Pair; in class Lorg/koin/dsl/DefinitionBindingKt; or its super classes (declaration of 'org.koin.dsl.DefinitionBindingKt' appears in /data/app/....6.dex)
    	at org.koin.android.ext.koin.KoinExtKt$androidContext$1.invoke(KoinExt.kt:60)
    	at org.koin.android.ext.koin.KoinExtKt$androidContext$1.invoke(KoinExt.kt:59)
    	at org.koin.dsl.ModuleDSLKt.module(ModuleDSL.kt:40)
    	at org.koin.dsl.ModuleDSLKt.module$default(ModuleDSL.kt:38)
    	at org.koin.android.ext.koin.KoinExtKt.androidContext(KoinExt.kt:59)
    	at dybarsky.rss.app.InjectionKt$initKoin$1.invoke(Injection.kt:11)
    

    Kotin 1.7.20 Koin 3.3.0

    Dependencies:

    implementation("io.insert-koin:koin-core:3.3.0")
    implementation("io.insert-koin:koin-android:3.3.0")
    
    opened by dybarsky 2
  • KClass for Objective-C classes is not supported yet

    KClass for Objective-C classes is not supported yet

    Describe the bug Creating this bug since this one is actually not resolved: https://github.com/InsertKoinIO/koin/issues/1016

    So the issue is currently we are not able to inject Objective-C classes directly that's why I use a wrapper class to hold Objective-C class inside. (In the example it is UserDefaults)

    If I try below app runs with no problem

    data class NativeDependencyWrapper(val userDefaults: NSUserDefaults)
    
    internal actual val settingsModule = module {
        single<Settings> {
            AppleSettings(get<NativeDependencyWrapper>().userDefaults)
        }
    }
    
    internal fun getIOSModule(userDefaults: NSUserDefaults) = module {
        single { NativeDependencyWrapper(userDefaults) }
    }
    

    But expected behaviour should be like below, we shouldn't need this extra wrapper:

    internal actual val settingsModule = module {
        single<Settings> { AppleSettings(get()) }
    }
    
    internal fun getIOSModule(userDefaults: NSUserDefaults) = module {
        single { userDefaults }
    }
    

    Here is a PR that I remove this wrapper class: https://github.com/Oztechan/CCC/pull/1525/files so it can be used as reproducer

    To Reproduce Steps to reproduce the behavior: Run the ios app in mentioned PR branch, after the app starts running it will crash with this log

    Function doesn't have or inherit @Throws annotation and thus exception isn't propagated from Kotlin to Objective-C/Swift as NSError.
    It is considered unexpected and unhandled instead. Program will be terminated.
    Uncaught Kotlin exception: kotlin.IllegalStateException: KClass for Objective-C classes is not supported yet
        at 0   CCC                                 0x10ea5304b        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 107 
        at 1   CCC                                 0x10ea4bf57        kfun:kotlin.Exception#<init>(kotlin.String?){} + 103 
        at 2   CCC                                 0x10ea4c197        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 103 
        at 3   CCC                                 0x10ea4c857        kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 103 
        at 4   CCC                                 0x10ea74a3c        kfun:kotlin.native.internal.KClassUnsupportedImpl#hashCode(){}kotlin.Int + 316 
        at 5   CCC                                 0x10eab57c9        kfun:kotlin.collections.HashMap.hash#internal + 217 
        at 6   CCC                                 0x10eab6445        kfun:kotlin.collections.HashMap.findKey#internal + 357 
        at 7   CCC                                 0x10eab35c9        kfun:kotlin.collections.HashMap#get(1:0){}1:1? + 217 
        at 8   CCC                                 0x10ef2686a        kfun:org.koin.ext#getFullName__at__kotlin.reflect.KClass<*>(){}kotlin.String + 314 
        at 9   CCC                                 0x10ef09548        kfun:org.koin.core.definition#indexKey(kotlin.reflect.KClass<*>;org.koin.core.qualifier.Qualifier?;org.koin.core.qualifier.Qualifier){}kotlin.String + 520 
        at 10  CCC                                 0x10ef11278        kfun:org.koin.core.module.Module#indexPrimaryType(org.koin.core.instance.InstanceFactory<*>){} + 488 
        at 11  CCC                                 0x10f119a01        kfun:com.oztechan.ccc.provider.di.module.getIOSModule$lambda$1#internal + 929 
        at 12  CCC                                 0x10f119b7b        kfun:com.oztechan.ccc.provider.di.module.$getIOSModule$lambda$1$FUNCTION_REFERENCE$2.invoke#internal + 107 
        at 13  CCC                                 0x10f119c7b        kfun:com.oztechan.ccc.provider.di.module.$getIOSModule$lambda$1$FUNCTION_REFERENCE$2.$<bridge-UNNN>invoke(-1:0){}#internal + 107 
        at 14  CCC                                 0x10ef2621d        kfun:org.koin.dsl#module(kotlin.Boolean;kotlin.Function1<org.koin.core.module.Module,kotlin.Unit>){}org.koin.core.module.Module + 365 
        at 15  CCC                                 0x10ef2635b        kfun:org.koin.dsl#module$default(kotlin.Boolean;kotlin.Function1<org.koin.core.module.Module,kotlin.Unit>;kotlin.Int){}org.koin.core.module.Module + 155 
        at 16  CCC                                 0x10f11959d        kfun:com.oztechan.ccc.provider.di.module#getIOSModule(platform.Foundation.NSUserDefaults){}org.koin.core.module.Module + 205 
        at 17  CCC                                 0x10f118c4b        kfun:com.oztechan.ccc.provider.di.initKoin$lambda$0#internal + 475 
        at 18  CCC                                 0x10f119282        kfun:com.oztechan.ccc.provider.di.$initKoin$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 114 
        at 19  CCC                                 0x10f11939b        kfun:com.oztechan.ccc.provider.di.$initKoin$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNNN>invoke(-1:0){}#internal + 107 
        at 20  CCC                                 0x10ef283a0        kfun:org.koin.core.context.MutableGlobalContext#startKoin(kotlin.Function1<org.koin.core.KoinApplication,kotlin.Unit>){}org.koin.core.KoinApplication + 688 
        at 21  CCC                                 0x10ef06ee8        kfun:org.koin.core.context#startKoin(kotlin.Function1<org.koin.core.KoinApplication,kotlin.Unit>){}org.koin.core.KoinApplication + 280 
        at 22  CCC                                 0x10f118375        kfun:com.oztechan.ccc.provider.di#initKoin(platform.Foundation.NSUserDefaults;com.oztechan.ccc.analytics.AnalyticsManager){}org.koin.core.KoinApplication + 437 
        at 23  CCC                                 0x10f1f32d0        objc2kotlin.3907 + 240 
        at 24  CCC                                 0x10e86294e        $s3CCC4koinSo017ProviderKoin_coreD0CvpfiADyXEfU_ + 254 
        at 25  CCC                                 0x10e862838        $s3CCC4koin_WZ + 8 
        at 26  libdispatch.dylib                   0x110d0a74d        _dispatch_client_callout + 7 
        at 27  libdispatch.dylib                   0x110d0bc9a        _dispatch_once_callout + 65 
        at 28  libswiftCore.dylib                  0x7fff2f3a0599     swift_once + 25 
        at 29  CCC                                 0x10e862a30        $s3CCC4koinSo017ProviderKoin_coreD0Cvau + 48 
        at 30  CCC                                 0x10e885ff3        $s3CCC11ApplicationVACycfC + 1203 
        at 31  CCC                                 0x10e8887c8        $s3CCC11ApplicationV7SwiftUI3AppAadEPxycfCTW + 8 
        at 32  SwiftUI                             0x7fff562e5375     $s7SwiftUI3AppPAAE4mainyyFZ + 46 
        at 33  CCC                                 0x10e888752        $s3CCC11ApplicationV5$mainyyFZ + 34 
        at 34  CCC                                 0x10e8887d8        main + 8 
        at 35  ???                                 0x11d90330f        0x0 + 4790956815 
    

    Expected behavior App should run

    Koin project used and used version (please complete the following information): koin-core version 3.3.0

    opened by mustafaozhan 0
Owner
insert-koin.io
All about Koin projects
insert-koin.io
Lightweight, minimalistic dependency injection library for Kotlin & Android

‼️ This project is in maintenance mode and not actively developed anymore. For more information read this statement. ‼️ Katana Katana is a lightweight

REWE Digital GmbH 179 Nov 27, 2022
:syringe: Transfuse - A Dependency Injection and Integration framework for Google Android

Transfuse Transfuse is a Java Dependency Injection (DI) and integration library geared specifically for the Google Android API. There are several key

John Ericksen 224 Nov 28, 2022
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.

Toothpick (a.k.a T.P. like a teepee) Visit TP wiki ! What is Toothpick ? Toothpick is a scope tree based Dependency Injection (DI) library for Java. I

Stéphane Nicolas 1.1k Jan 1, 2023
Painless Kotlin Dependency Injection

KOtlin DEpendency INjection Kodein-DI is a very simple and yet very useful dependency retrieval container. it is very easy to use and configure. Kodei

null 2.9k Jan 1, 2023
The dependency injection Dagger basics and the concepts are demonstrated in different branches

In this project we will look at the dependency injection Dagger basics and the concepts are demonstrated in different branches What is an Dependency?

Lloyd Dcosta 6 Dec 16, 2021
A multi-purpose library containing view injection and threading for Android using annotations

SwissKnife A multi-purpose Groovy library containing view injection and threading for Android using annotations. It's based on both ButterKnife and An

Jorge Martin Espinosa 251 Nov 25, 2022
A SharedPreference "injection" library for Android

PreferenceBinder A SharedPreferences binding library for Android. Using annotation processing, this library makes it easy to load SharedPreferences va

Denley Bihari 232 Dec 30, 2022
A fast dependency injector for Android and Java.

Dagger A fast dependency injector for Java and Android. Dagger is a compile-time framework for dependency injection. It uses no reflection or runtime

Google 16.9k Jan 5, 2023
A fast dependency injector for Android and Java.

Dagger 1 A fast dependency injector for Android and Java. Deprecated – Please upgrade to Dagger 2 Square's Dagger 1.x is deprecated in favor of Google

Square 7.3k Jan 5, 2023
DependencyProperty is a dependency resolution library by Delegated Property.

DependencyProperty is a dependency resolution library by Delegated Property. Overview DependencyProperty is simple in defining and

wada811 10 Dec 31, 2022
Koin-compose - A pragmatic lightweight dependency injection framework for Kotlin developers

What is KOIN? - https://insert-koin.io A pragmatic lightweight dependency inject

insert-koin.io 17 Dec 14, 2022
A pragmatic lightweight dependency injection framework for Kotlin developers.

A pragmatic lightweight dependency injection framework for Kotlin developers. Koin is a DSL, a light container and a pragmatic API

insert-koin.io 11 Dec 14, 2022
Koin Annotations - help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you

The goal of Koin Annotations project is to help declare Koin definition in a very fast and intuitive way, and generate all underlying Koin DSL for you. The goal is to help developer experience to scale and go fast ?? , thanks to Kotlin Compilers.

insert-koin.io 68 Jan 6, 2023
TikTok-RecyclerView - This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoPlayer2.

TikTok-RecyclerView Demo About This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoP

Baljeet Singh 19 Dec 28, 2022
🍓CookHelper - food social network. The Api and Websocket are based on Ktor framework. Dependency injection with Koin library.

CookHelper [ ?? Work in Progress ?? ] CookHelper is a cross-platform application that will allow you to cook a delicious dish from an existing recipe

Arthur 11 Nov 9, 2022
MovieStreaming - Movie Streaming is a streaming app and developed with Kotlin and Koin Dependency injection

MovieStreaming Movie Streaming is a streaming app and developed with Kotlin and

Amir Ali 3 Nov 19, 2022
🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture

GithubSearchKMM Github Repos Search - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Depend

Petrus Nguyễn Thái Học 50 Jan 7, 2023
Dependency Injection library for Compose Multiplatform, Koin wrapper.

?? Cokoin Injection library for Compose (Multiplatform and Jetpack), Koin wrapper. It uses @Composable functions to configure KoinContext and Scopes.

Bruno Wieczorek 57 Dec 29, 2022
Flavor - A lightweight Kotlin dependency injection & service management framework.

flavor A light-weight kotlin dependency injection & service management framework. Flavor is based around guice's design. Usage: Creating a Flavor inst

Subham 4 Oct 31, 2022
Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 6 and above, brought to you by Google.

Guice Latest release: 5.0.1 Documentation: User Guide, 5.0.1 javadocs, Latest javadocs Continuous Integration: Mailing Lists: User Mailing List Licens

Google 11.7k Jan 1, 2023