使用:
implementation 'com.squareup.okhttp3:okhttp:3.14.0'
异步请求,报错
Process: com.example.yangzhan.okhttptest, PID: 23648
java.lang.BootstrapMethodError: Exception from call site #3 bootstrap method
.....
解决方式:在build.gradle中添加以下代码Java8的新特性
compileOptions{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
之后
clean project,rebuild project