# Error: Default interface methods are only supported starting with Android N (–min-api 24): void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)
解决方案:
在你的app的build.gradle文件中添加以下内容,在android标签下内部。
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}