Application is crashing when using koin outside SDK #2103
Labels
bom
question
Usage question
status:checking
currently in analysis - discussion or need more detailed specs
Application is crashing when trying to access koin from SDK
Error logs:
2025-01-02 14:34:24.522 6703-6703 AndroidRuntime com.example.feedbacksdkcheckchange E FATAL EXCEPTION: main
Process: com.example.feedbacksdkcheckchange, PID: 6703
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/core/context/DefaultContextExtKt;
at com.aligntech.feedbacksdk.FeedbackSDK.init(FeedbackSDK.kt:9)
at com.example.feedbacksdkcheckchange.FeedbackSDKApplication.onCreate(FeedbackSDKApplication.kt:10)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7588)
at android.app.ActivityThread.access$1700(ActivityThread.java:315)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2286)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.koin.core.context.DefaultContextExtKt" on path: DexPathList[[dex file "/data/data/com.example.feedbacksdkcheckchange/code_cache/.overlay/base.apk/classes5.dex", zip file "/data/app/~~25IjY2UFjXW9UV7WmYzzfQ==/com.example.feedbacksdkcheckchange-eFSYpTZftzLqjBnKVvt8cA==/base.apk"],nativeLibraryDirectories=[/data/app/~~25IjY2UFjXW9UV7WmYzzfQ==/com.example.feedbacksdkcheckchange-eFSYpTZftzLqjBnKVvt8cA==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.aligntech.feedbacksdk.FeedbackSDK.init(FeedbackSDK.kt:9)
at com.example.feedbacksdkcheckchange.FeedbackSDKApplication.onCreate(FeedbackSDKApplication.kt:10)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7588)
at android.app.ActivityThread.access$1700(ActivityThread.java:315)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2286)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
**Here are my code snippets
SDK Koin initiation code:
object FeedbackSDK {
}
Dependenies
implementation(project.dependencies.platform(libs.koin.bom))
implementation (libs.koin.android)
implementation (libs.koin.androidx.compose)
implementation (libs.koin.navigation.compose)
implementation(libs.koin.core)
libs.toml
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin" }
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin" }
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-navigation-compose = { module = "io.insert-koin:koin-compose-viewmodel-navigation", version.ref = "koin"}
Accessing Koin outside of SDK:
FeedbackSDK.init() // Inside application onCreate
Please help here.
The text was updated successfully, but these errors were encountered: