Static interface methods are only supported starting with Android N (--min-api 24)

依然范特西╮ 提交于 2020-05-10 07:39:43

问题


I do nothing, just create new project then find this error. pls help me


回答1:


This is a common issue and you just need to add

android {
...
  compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
...
}

There is explanation and direction in this link




回答2:


build.gradle App module

android{
   compileOptions {
     sourceCompatibility JavaVersion.VERSION_1_8
     targetCompatibility JavaVersion.VERSION_1_8
   }
}

More Details



来源:https://stackoverflow.com/questions/53402639/static-interface-methods-are-only-supported-starting-with-android-n-min-api-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!