hedzr / android-file-chooser

a lightweight file/folder chooser or picker
Apache License 2.0
284 stars 62 forks source link

I get an Invoke-customs error when buidling with 1.1.16 #53

Closed ytheekshana closed 5 years ago

ytheekshana commented 5 years ago

I get an issue like this when building with 1.1.16

Error: Invoke-customs are only supported starting with Android O (--min-api 26)

Latest Android Studio Stable

hedzr commented 5 years ago

Java 8 enabled from 1.1.16. You could add compartibility in app/build.gradle:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

See also:

Guiorgy commented 5 years ago

I think it should say somewhere that target sdk is 1.8, and that it was changed in 1.1.16 update, no?

ytheekshana commented 5 years ago

Java 8 enabled from 1.1.16. You could add compartibility in app/build.gradle:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

See also:

* https://stackoverflow.com/questions/49891730/invoke-customs-are-only-supported-starting-with-android-0-min-api-26

Perfect. It works

Guiorgy commented 5 years ago

this should be close right, hedzr?

carlos-mg89 commented 5 years ago

Adding the sourceCompatibility doesn't fix the Invoke-customs error in my case. Could it be because my minSdkVersion is 19?

hedzr commented 5 years ago

have tried a fully clean and rebuild?

carlos-mg89 commented 5 years ago

@hedzr my bad, that made it work and removed the Invoke-customs issue. Thanks!