java - PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:代理后面
问题描述
Android Studio 突然开始出现此错误:
A problem occurred configuring root project 'Projectname'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not download gradle.jar (com.android.tools.build:gradle:3.4.2)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar'.
> Connection reset
> Could not download builder.jar (com.android.tools.build:builder:3.4.2)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.4.2/builder-3.4.2.jar'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.4.2/builder-3.4.2.jar'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not download tracker.jar (com.android.tools.analytics-library:tracker:26.4.2)
我已经导出了证书(名称:dlgooglecom)并将其添加到 cacert 但仍然是同样的错误。
keytool.exe -import -trustcacerts -alias androidstudiocerts -file dlgooglecom.cer -keystore "C:\Program Files\Android\Android Studio1\jre\lib\security\cacerts"
输出 :
C:\Program Files\Android\Android Studio1\jre\bin> keytool.exe -import -trustcacerts -alias dlgoogle1 -file dlgooglecom.cer -keystore "C:\Program Files\Android\Android Studio1\jre\lib\security\cacerts"
Warning: use -cacerts option to access cacerts keystore
Enter keystore password:
Certificate already exists in keystore under alias <dlgoogle>
Do you still want to add it? [no]: yes
Certificate was added to keystore
请有人指导。我在代理后面,代理连接工作正常。
解决方案
推荐阅读
- angular - Angular 7:EventEmitter 对点击事件不起作用
- python - 排序外部多索引
- javascript - 减速器功能改变状态,但屏幕不重新渲染
- javascript - 我的功能没有识别正确的人
- python - 为什么我不能从我的 Django Paginator 中得到正确的结果
- javascript - 在 For 循环中创建 JavaScript 数组
- html - Gliderjs 单杠类
- python - 未找到 Seaborn 模块“histplot”
- plot - 如何在 Rmarkdown shinny 中绘制分层时间序列
- javascript - 为什么 Javascript .filter() 不返回带有活动过滤器(== 或 ===)的任何内容,但如果布尔逻辑的类型为 != 或 !== 则可以正常工作?