I am trying to use annotations in my KMP applicati...
# koin
j
I am trying to use annotations in my KMP application, but I have an error that I can't work around. I am using code from HelloWorld-KMP, using the annotations branch. A problem occurred configuring project ':androidApp'.
Could not create task 'androidAppcompileDebugKotlin'.
> Cannot convert the provided notation to a File or URI: [/Users/jamesblack/AndroidStudioProjects/MyPasswordSafe/androidApp/build/generated/ksp/debug/kotlin].
I am using these versions:
Copy code
implementation("io.insert-koin:koin-core:3.3.0")
implementation("io.insert-koin:koin-android:3.2.1")
implementation("io.insert-koin:koin-annotations:1.1.0")
implementation("io.insert-koin:koin-androidx-compose:3.2.0")
implementation("io.insert-koin:koin-android:3.2.1")
implementation("io.insert-koin:koin-androidx-viewmodel:2.2.3")
ksp("io.insert-koin:koin-ksp-compiler:1.1.0")
And this was the cause of the error. I am not certain what else is needed to help me resolve the error.
Copy code
applicationVariants.all {
    val variantName = name
    sourceSets {
        getByName("main") {
            java.srcDir(File("build/generated/ksp/$variantName/kotlin"))
        }
    }
}
a
you can compare with Android Annotations tutorial: https://insert-koin.io/docs/quickstart/android-annotations