InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.95k stars 712 forks source link

InstanceCreationException When Running Koin on Android 14 (Target SDK 34) #1959

Open liboyan666 opened 3 weeks ago

liboyan666 commented 3 weeks ago

I have integrated Koin into my Android project using the following dependencies:

api platform("io.insert-koin:koin-bom:3.5.6") api "io.insert-koin:koin-android" After upgrading the targetSdkVersion to 34, the application crashes with the following error on devices running Android 14:

org.koin.core.error.InstanceCreationException This issue only occurs on Android 14 devices. The application works fine on devices running Android versions below 14.

Steps to Reproduce:

Set the targetSdkVersion to 34 in your Android project. Add the Koin BOM and koin-android dependencies as shown in the code snippet above. Run the application on an Android 14 device. Observe the crash with the InstanceCreationException. Expected Behavior:

The application should run without any errors on Android 14 devices, as it does on earlier Android versions.

Actual Behavior:

On Android 14 devices, the application crashes with an InstanceCreationException. However, it works perfectly on devices running Android 13 and below.

Additional Information:

Android Studio version: Android Studio Koala | 2024.1.1 Patch 1 Gradle version: 8.10 Koin version: 3.5.6 Target SDK: 34 Devices tested: [samsung Android 14]

arnaudgiuliani commented 2 weeks ago

what is the stack trace of your error?