解决android studio 总是出现的问题!(android studio4.1.0)

2023-05-16

两个错误:

1. 

  • Cause: unable to find valid certification path to requested target

2. 

  • sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

更新了android studio 4.1.0 ,之后又有这个问题了,折腾了挺久的,看着也挺可怕的,总是出现。今天网上搜了一遍,得出应该是证书的问题。

下面贴图,

Accepted certificates的 N/A 那里,看下是否有很多项,然后全部 delete 掉,保存 ok,再sync下,应该是可以了。

注意:

       如果不行的话,再build.gradlle 那里 添加阿里源和原仓库源。

buildscript {
    repositories {
        maven{url 'https://maven.aliyun.com/repository/jcenter'}
        maven{url 'https://maven.aliyun.com/repository/google'}
        jcenter()
        google()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven{url 'https://maven.aliyun.com/repository/jcenter'}
        maven{url 'https://maven.aliyun.com/repository/google'}
        jcenter()
        google()
    }
}

 

(话说build 不是success了,是finish了,怪怪的。)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

解决android studio 总是出现的问题!(android studio4.1.0) 的相关文章

随机推荐