美文网首页
Expected Android API level 21+ b

Expected Android API level 21+ b

作者: lirudong | 来源:发表于2022-05-05 09:56 被阅读0次

    OKhttp3版本过低导致在安卓高版本上闪退

    Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 30
            at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:238)
            at okhttp3.internal.platform.Platform.findPlatform(Platform.java:202)
            at okhttp3.internal.platform.Platform.<clinit>(Platform.java:79)
    
    

    解决办法:升级最新的OKhttp3版本

    implementation 'com.squareup.okhttp3:okhttp:4.9.3'
    implementation 'com.squareup.okio:okio:2.8.0'
    

    相关文章

      网友评论

          本文标题:Expected Android API level 21+ b

          本文链接:https://www.haomeiwen.com/subject/yzvvpltx.html