在线咨询
微信咨询
服务热线
服务热线:15639912513
TOP
当前位置:
首页 > 新闻中心> 安卓课堂>Static interface methods are only s…

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

发布时间:2020-06-08 浏览:5595次

郑州app开发过程中,遇到问题:Static interface methods are only supported starting with Android N (--min-api 24): okhttp3.Request okhttp3.Authenticator.lambda$static$0(okhttp3.Route, okhttp3.Response)。

出现这些错误,主要是需要添加配置声明。下面是修改地方:

 compileOptions {

        sourceCompatibility JavaVersion.VERSION_1_8

        targetCompatibility JavaVersion.VERSION_1_8

    }

请把上面这段代码,添加到如下位置:

1-1Z523161019592.png

其实就是添加依赖的地方,不过是上面,请看红框圈起来的地方。

TAG
5595
该内容对我有帮助