标签:报错信息 life start blank and ace col serve 升级
升级完 Android N 后,有些项目运行起来报错信息大致如下:
Default interface methods are only supported starting with Android N (--min-api 24):
void android.arch.lifecycle.DefaultLifecycleObserver.onCreate(android.arch.lifecycle.LifecycleOwner) Message{kind=ERROR, text=Default interface methods are only supported starting with Android N (--min-api 24):
void android.arch.lifecycle.DefaultLifecycleObserver.onCreate(android.arch.lifecycle.LifecycleOwner),
sources=[Unknown source file], tool name=Optional.of(D8)}
在 app 下的 build.gradle 文件 android 界面点加入:compileOptions
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
}
8、D8: Default interface methods are only supported starting with Android N (--min-api 24): void
标签:报错信息 life start blank and ace col serve 升级
原文地址:https://www.cnblogs.com/niceyoo/p/10325271.html