0
点赞
收藏
分享

微信扫一扫

编译报错:R8: Static interface methods are only supported starting with Android N (--min-api 24): okhttp3

Sophia的玲珑阁 2022-02-27 阅读 40


报错信息

R8: Static interface methods are only supported starting with Android N (--min-api 24): okhttp3.Request okhttp3.Authenticator.lambda$static$0(okhttp3.Route, okhttp3.Response)

> Task :app:transformClassesAndResourcesWithR8ForRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithR8ForRelease'.

解决方案

在build.gradle文件的android节点下增加如下compileOptions.

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



举报

相关推荐

0 条评论