SSL error while loading image from server using kotlin

0

Am using Koltin v1.3.40,in that try load images from server using glide getting SSL exception in lower end devices.meanwhile implemented TLS functionality for low end devices.After removing kotlin plugin images getting loaded properly from server.Kindly suggest to resolve the problem.

class com.bumptech.glide.load.engine.GlideException:
Failed to load resource There was 1 cause: 
javax.net.ssl.SSLHandshakeException(javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7d8e2a90: Failure in SSL library, usually a protocol error error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:744 0x746ab7e8:0x00000000)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE –
android
tls1.2
android-glide
asked on Stack Overflow Jul 5, 2019 by user2911064 • edited Jul 7, 2019 by c-an

1 Answer

0

Create a xml folder in res then create network_security_config.xml

So, res/xml/network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true"/>
</network-security-config>

Then,

Go to the manifests.xml and add this attribute in the <application

android:networkSecurityConfig="@xml/network_security_config"

reference: https://developer.android.com/training/articles/security-config

answered on Stack Overflow Jul 5, 2019 by c-an

User contributions licensed under CC BY-SA 3.0