Hello everyone. I'm having similar problem. ```imp...
# koin
n
Hello everyone. I'm having similar problem.
Copy code
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import org.koin.core.context.startKoin
import org.koin.dsl.module

class TestClass

class ComponentClass : KoinComponent {
    val testClass: TestClass by inject()
}

fun main() {
    startKoin {
        module {
            single { TestClass() }
        }
    }

    println(ComponentClass().testClass)
}
This code makes
Exception in thread "main" org.koin.core.error.NoBeanDefFoundException: No definition found for class:'TestClass' q:''. Check your definitions!
. Do anyone knows why this happens?
a
should work. Can you Put your TestClass & ComponentClass in other files?