vinceglb / FileKit

Pick and save Files, Medias and Folder for Kotlin Multiplatform / KMP and Compose Multiplatform / CMP
https://vinceglb.github.io/FileKit/
MIT License
249 stars 8 forks source link

dosent support minsdk lower than 24 #10

Closed Tanzin01 closed 2 months ago

Tanzin01 commented 2 months ago

As the title says.

vinceglb commented 2 months ago

Sorry, I'm not sure to understand your issue.

On Android apps, based on XML or not, we are able to change minsdk version.

Can you describe your problem a little more?

Tanzin01 commented 2 months ago

My apology, not a english speaker.

I meant , i tried the library on a xml based android app which had a minSdk 21 but gradle was complaning pickerKotlin library had set its own minsdk to 24. Thus i cant use the library unless i set my minSdk to 24. Let me post the error.

app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 24 declared in library [io.github.vinceglb:picker-core-android:0.2.0] /data/data/com.itsaky.androidide/files/home/.gradle/caches/transforms-4/d4ef3309bf3cee7474edaaff30a1b4f9/transformed/picker-core-release/AndroidManifest.xml as the library might be using APIs not available in 16
    Suggestion: use a compatible library with a minSdk of at most 16,
        or increase this project's minSdk version to at least 24,
        or use tools:overrideLibrary="io.github.vinceglb.picker" to force usage (may lead to runtime failures)

I noticed the title lacks a semi colon . Will change it.

vinceglb commented 2 months ago

I have lowered the minSdk to enable using it with android minSdk 21 (it was 24 earlier).

To update, use the version 0.2.1: implementation("io.github.vinceglb:picker-core:0.2.1")

And also, in your build.gradle, make sure to set minSdk = 21 like:

android {
    namespace = "..."
    compileSdk = 34

    defaultConfig {
        minSdk = 21            // <-- put 21 here
        targetSdk = 34
    }

        ...

Android API 16 to 20 are not supported by the library.

Tanzin01 commented 2 months ago

Got it. Thanks.