首页 > 解决方案 > 错误:ssl_client_socket_impl.cc(946) 握手失败;返回 -1,SSL 错误代码 1,android 上的 net_error -202

问题描述

我已经使用电容器将 Web 应用程序转换为 android 应用程序,我的 API 正在 HTTPS 模式下运行,但是当我尝试访问 API 时,我遇到了错误。

      [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -202

我不不,我在哪里做错了,

我的 AndroidMainfest.xml

  <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    android:networkSecurityConfig="@xml/network_security_config"
    android:usesCleartextTraffic="true">

network_security_config.xml

        <?xml version="1.0" encoding="utf-8"?>
          <network-security-config>
          <domain-config cleartextTrafficPermitted="true">
          <domain includeSubdomains="true">api.**.*****.com</domain>
          </domain-config>
          </network-security-config>

标签: android

解决方案


从 Google Play 更新“Android System Webview”应用


推荐阅读