Skip to content

SSLProtocolException while usinf Retrofit #5329

@gobandoGH

Description

@gobandoGH

I am trying a Retrofit an android studio implementation on an Android Version 4.4.2, and having the following error:
Failure:javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x4ee7c5b0: 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 0x4ea4bcfc: 0x0000000)

and this the Kotlin code:

private val retrofit = Retrofit.Builder()
        .baseUrl(BASE_URL)
        .addConverterFactory(ScalarsConverterFactory.create())
        .build()

interface MarsApiService {
    @GET("realestate")
    fun getProperties():
            Call<String>
}

object MarsApi {
    val retrofitService : MarsApiService by lazy {
        retrofit.create(MarsApiService::class.java)
    }
}

Appreciate highly your help
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidRelates to usage specifically on Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions