multiplatform-markdown-renderer icon indicating copy to clipboard operation
multiplatform-markdown-renderer copied to clipboard

app demo can't run in Android 23 emulator

Open jiyewushen opened this issue 1 year ago • 2 comments

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)

image

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)
            }
        }
    }
}

jiyewushen avatar Oct 16 '24 13:10 jiyewushen

please make sure you use compose 1.7 or newer

mikepenz avatar Oct 16 '24 13:10 mikepenz

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.

jiyewushen avatar Oct 17 '24 07:10 jiyewushen

The cause of this carsh is Default methods require API level 24. Maybe this problem will be solved when desuagr is enabled.

keta1 avatar Oct 29 '24 09:10 keta1

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.

mikepenz avatar Nov 01 '24 08:11 mikepenz

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.

mikepenz avatar Nov 01 '24 08:11 mikepenz

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

keta1 avatar Nov 01 '24 12:11 keta1