Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
Owner and Founder. Opencart
This blog focus on Retrofit handle the SSLHandshakeException.
Using Retrofit as your network library is a very good option for android app development. But many a time we face the SSLHandshakeException (java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.) to be particular.
This error means that the secure url you are making request to is not allowing your Retrofit to connect and fetch data.
If you can manage to change the usage from https to http then this will work perfectly fine and you don’t need to actually change anything.
But, if you can’t then you need to modify your retrofit Request builder object ( OkHttpClient.Builder to be particular) so that your application can fetch the data and the exception mentioned in the title is not a hurdle anymore.
You need to modify your OkHttpClient.Builder object in your Retrofit request so that your request can actually create a certificate that can be trusted by your server and your server can allow the access to your request.
Modified OkHttpClient.Builder Object.
using this object in your retrofit request.
Keep coding and Keep Sharing.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
It is good to hear that our blog helped you.
It means a lot.
But we don’t accept donations for technical blogs.
These blogs are one of the efforts from our side to make the mobile development community better.
Thanks for your appreciating words.
The images are perhaps not working becuase you might be using some different library to load the images.
If this is the case, then please do consider adding something similar for the image library as well.
If you are not using any library to load the images from a url, then please do let me know how are you loading the images so that i can suggest something.
Gracias por tus amables palabras
Consulte también nuestros otros blogs
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Owner, Shop ATV Escape
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.