https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

Hossein Amini

11/06/2023, 12:26 PM
Hey folks When I run KMP project on Android api 21 & 23 the app crashes and says: java.lang.NoClassDefFoundError: io.ktor.util.collections.ConcurrentMap$$ExternalSyntheticLambda0 It seems it’s because of the Ktor that is not compatible with older Android versions. How can I fix it?
m

mbonnin

11/06/2023, 12:28 PM
Looks like this: https://youtrack.jetbrains.com/issue/KTOR-4751, you'll need to enable desugaring for your Android app
h

Hossein Amini

11/06/2023, 12:45 PM
After enabling desugaring the project does not build any more and shows this error. Do you have any idea to fix it?
m

mbonnin

11/06/2023, 1:22 PM
What error?
h

Hossein Amini

11/07/2023, 6:09 AM
Sorry I forgot to upload the image
m

mbonnin

11/07/2023, 9:21 AM
This view is filtering out the logs. You'll have to build from the command line or focus the top-level item (build Bama KMM failed) to get the actual error
h

Hossein Amini

11/07/2023, 9:49 AM
By updating gradle version to 8.3 & 8.1.2 it fixed, thank you
👍 1
7 Views