java.lang.BootstrapMethodError: I am getting this error?

java.lang.BootstrapMethodError: I am getting this error?

我正在尝试使用改装获取一些数据,但在执行代码时出现此错误

Exception from call site #4 bootstrap method ,when initializing Retrofit

尝试添加:

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

在你的成绩档案中。 希望这有助于解决您的问题