Rejecting re-init on previously-failed class in OkHttp

前端 未结 2 430
星月不相逢
星月不相逢 2021-02-02 07:26

I\'m trying to upload an image to my server using flask back end which will handle the file to save in a folder and OkHttp in android. but I get this error in android:



        
相关标签:
2条回答
  • 2021-02-02 08:00

    OkHttp is compatible with the Conscrypt security library, but using it is optional. The stack trace is scary, but I think it is just a warning telling you that the Conscrypt dependency was not found. In this case, OkHttp should fall back to your platform's default TLS implementation.

    From OkHttp's README:

    OkHttp uses your platform's built-in TLS implementation. On Java platforms OkHttp also supports Conscrypt, which integrates BoringSSL with Java. OkHttp will use Conscrypt if it is the first security provider:

    Security.insertProviderAt(Conscrypt.newProvider(), 1);

    So long story short, if your network requests are working, it is probably safe to ignore this stack trace.

    0 讨论(0)
  • 2021-02-02 08:03

    While reading the info message, it gives me an idea about this Conscrypt and did a research and found out that I need to install conscrypt to my gradle.app

    implementation 'org.conscrypt:conscrypt-android:2.2.1'
    

    and it works.

    0 讨论(0)
提交回复
热议问题