java.security.cert.CertPathValidatorException: Trust anchor for certification path not found on Android 7.0

2.5k Views Asked by At

I'm using https://github.com/lingochamp/FileDownloader for downloading from https server. I'm getting the exception on below android 7 only while downloading.

Trust anchor for certification path not found

I have tried adding network_security_config from https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html but this didn't solve the problem. Can anyone help me please? Code snippet of initializing file downloader:

FileDownloader.setupOnApplicationOnCreate(this)
                .connectionCreator(
                    FileDownloadUrlConnection.Creator(
                        FileDownloadUrlConnection.Configuration()
                            .connectTimeout(15000) // set connection timeout.
                            .readTimeout(15000) // set read timeout.
                    )
                )
                .commit()
0

There are 0 best solutions below