multiplatform-markdown-renderer
multiplatform-markdown-renderer copied to clipboard
app demo can't run in Android 23 emulator
About this issue
- Briefly describe the issue
- How can the issue be reproduced / sample code
Details
- develop branch,no change
- [Ladybug 2024.2.1 Patch 1 ] Used tooling / Android Studio version
//test android 24 & android 34,no error. //test android 21 & android 23,same error.
java.lang.NoSuchMethodError: No static method addRoundRect$default(Landroidx/compose/ui/graphics/Path;Landroidx/compose/ui/geometry/RoundRect;Landroidx/compose/ui/graphics/Path$Direction;ILjava/lang/Object;)V in class Landroidx/compose/ui/graphics/Path; or its super classes (declaration of 'androidx.compose.ui.graphics.Path' appears in /data/app/com.mikepenz.markdown-2/base.apk)
when add next config on multiplatform-mark-renderer module build.gradle.kts,app now work well at android 21 (include android 23).
kotlin {
//...
sourceSets {
//...
val commonMain by getting {
dependencies {
//only add this
implementation(compose.foundation)
}
}
}
}
please make sure you use compose 1.7 or newer
please make sure you use compose 1.7 or newer
Maybe my description wasn't accurate enough. All code is from the develop branch of the current project and I have not made any changes. Just run the app module on the official android emulator (api 21 or api 23),then the above error occurs. I have also confirmed that Compose Version is 1.7.3.
The cause of this carsh is Default methods require API level 24. Maybe this problem will be solved when desuagr is enabled.
Attempted to enable desugaring, but it didn't seem to fix it.
That said. this seems to be from compose, and not from this library itself. Will update the sample app to min API 24 though to be more clear on this.
If someone has some more resources to look into to address this, I'd be curious about it. But so far I'll close this as it appears to be out of scope of the lib itself.
If someone has some more resources to look into to address this, I'd be curious about it. But so far I'll close this as it appears to be out of scope of the lib itself.
I think need report this problem to Google, I will take the time to create a minimal reproduction example and submit it to Google