You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级到Android 16(SDK 36)后API调用出现CertPathValidatorException问题求助

升级到Android 16(SDK 36)后API调用出现CertPathValidatorException问题求助

各位好,我最近把应用适配到Android 16(SDK 36)之后,遇到了一个棘手的问题:所有API调用都会触发SSL握手失败,抛出的异常信息如下:

Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:222)
    at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:705)

目前我已经做了这些排查和尝试,但问题依然存在:

  • 确认了在Android 16以下的版本中,完全没有这个问题
  • 在多台运行Android 16的实体设备和模拟器上都复现了该异常
  • 已经升级了OkHttp、Retrofit以及所有相关Android依赖到最新版本

有没有朋友遇到过类似的情况?或者能给我一些下一步排查的方向?非常感谢!

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.07 10:55:27