gpt4 book ai didi

java - Android Studio 3.0.1 gradle build pkix 路径构建失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:36:19 26 4
gpt4 key购买 nike

我在 android studio 3.0.1 中创建了一个新项目,设置了公司的代理设置,并添加了自签名证书 unser 服务器证书。当我尝试构建时,列出了以下错误并且构建失败。

错误:

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.

Could not resolve com.android.support:appcompat-v7:26.1.0.
Required by:
project :app
> Could not resolve com.android.support:appcompat-v7:26.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> unable to find valid certification path to requested target

有人能帮帮我吗?

最佳答案

通过将我公司的自签名证书添加到 Android Studio 的 cacerts 文件中解决了这个问题。 cacerts 文件位于:C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts

我还在 gradle.properties 中添加了 http/https 的代理详细信息。

关于java - Android Studio 3.0.1 gradle build pkix 路径构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47678240/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com