- 异常之:Static interface methods are
- Error: Static interface methods
- Error: Static interface methods
- Static interface methods are onl
- 记一次使用butterknife 10.1.0报异常
- Static interface methods are onl
- Static interface methods are onl
- Static interface methods are onl
- Error: Default interface methods
- 错误Static interface methods are o
报错明细
Static interface methods are only supported starting with Android N (--min-api 24):
问题分析以及解决办法
分析
由于在Java8才支持静态接口的方法。
解决办法
- 在app的build.gradle中加入下面的代码,重新编译运行就可以了。
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
网友评论