Default interface methods are only supported starting with Android N (--min-api 24): Landroidx/lifecycle/DefaultLifecycleObserver;onCreate(Landroidx/lifecycle/LifecycleOwner;)V
Execution failed for task ':app:minifyReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: Landroidx/lifecycle/DefaultLifecycleObserver;onCreate(Landroidx/lifecycle/LifecycleOwner;)V
I have checked in library and I found that you are using in by.kirich1409.viewbindingdelegate.ViewBindingProperty.kt file:
@RestrictTo(LIBRARY_GROUP)
public abstract class LifecycleViewBindingProperty<in R : Any, T : ViewBinding>(
private val viewBinder: (R) -> T
) : ViewBindingProperty<R, T> {
/* ... */
private inner class ClearOnDestroyLifecycleObserver : DefaultLifecycleObserver {
@MainThread
override fun onDestroy(owner: LifecycleOwner): Unit = clear()
}
/* ... */
}
I am getting error while building apk for release. I am using this version:
The error:
I have checked in library and I found that you are using in
by.kirich1409.viewbindingdelegate.ViewBindingProperty.kt
file: