更新时间:2023-12-03 12:37:34
当android从TLSv1退回到SSLv3时,通常会发生该错误.
That error usually occurs when android falls back to SSLv3 from TLSv1.
尝试以下解决方案:
打开您的 Application
类,并在其 onCreate()
方法中编写以下代码.
Open your Application
class and write below code in its onCreate()
method.
try {
ProviderInstaller.installIfNeeded(getApplicationContext());
SSLContext sslContext;
sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
sslContext.createSSLEngine();
} catch (GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException
| NoSuchAlgorithmException | KeyManagementException e) {
e.printStackTrace();
}