RamiJ3mli / PercentageChartView

An Android custom view that displays the progress of an ongoing task.
Apache License 2.0
377 stars 82 forks source link

Min Api version? #13

Closed webserveis closed 5 years ago

webserveis commented 5 years ago

I recive "Error: Default interface methods are only supported starting with Android N (--min-api 24): int com.ramijemli.percentagechartview.callback.AdaptiveColorProvider.provideBackgroundBarColor(float) "

RamiJ3mli commented 5 years ago

Default interface methods is a Java 8 feature. So, you should add this to your app module's build.gradle file.

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

I had to use it to make developers override only the methods they need. Please check and let me know if this works out for you.