仅从Android N开始支持默认接口方法
我已升级到android studio 3.1,但出现以下错误: 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)} 这是我的gradle配置: compileSdkVersion 27 //buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 16 targetSdkVersion 27 multiDexEnabled true …