I have added network security config in manifest, but I am still getting hostname not verified error.

<manifest ...>
   android:networkSecurityConfig="@xml/network_security_config"
</manifest>

<network-security-config>
  <domain-config>
    <domain includeSubdomains="true">XXX</domain>
    <trust-anchors>
        <certificates src="system" />
        <certificates src="user" />
        <certificates src="@raw/xxx"/> This is a .cer file
    </trust-anchors>
  </domain-config>
</network-security-config>

But I am still getting the below error.

System.err: javax.net.ssl.SSLPeerUnverifiedException: Hostname XXX not verified
0

There are 0 answers