Android运行报错:Error: Static interface methods are only supported starting with Android(安卓)N
16lz
2021-12-04
问题说明:
运行时报错。错误如下: Static interface methods are only supported starting with Android N (--min-api 24)。
问题原因:
仅从Android N开始支持静态接口方法。
解决办法:
指定jdk版本
android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }}
重新运行即可。
更多相关文章
- mybatisplus的坑 insert标签insert into select无参数问题的解决
- Android系统工具之Roblectric 使用过程中问题总结
- Android(安卓)NDK学习 C++ 支持
- 2013.03.19(3)———android ActivityGroup的一些问题
- android 字符串国际化的问题
- Android(安卓)ListView 问题
- Android默认设置静态IP
- [原]运行编译好的Android模拟器
- android orientationchange的问题