问题
Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 3
解决
查看 Okhttp3 版本,编辑器推荐的:
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
1
网上找了很久都没有,后来到官网,根据官网改成了最新版:
implementation 'com.squareup.okhttp3:okhttp:4.8.1'
1
Sync 后,问题解决
OkHttp 官网
https://square.github.io/okhttp/