Default Interface Methods Are Only Supported Starting with Android 7.0 (Nougat)

Default interface methods are only supported starting with Android 7.0 (Nougat)

As CommonsWare mentioned, for reference add this inside the android {...} closure in the build.gradle for your app module (app level) to resolve the issue:

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

Static interface methods are only supported starting with Android N (--min-api 24)

This is a common issue and you just need to add

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

There is explanation and direction in this link



Related Topics



Leave a reply



Submit