Expected Android API level 21+ but was 30
Add an explicit dependency on OkHttp 4.9.0. Or whatever is newest at the time you read this.
This bug is embarrassing but it's been fixed for so long that you shouldn’t be encountering it in new code.
Just Add the Dependency implementation 'com.squareup.okhttp3:okhttp:4.9.2'
PS - Check the latest version here before you add the dependency https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp