溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Android studio 3.6.1出現(xiàn)Cause: unable to find valid certification path to requested target報錯怎么辦

發(fā)布時間:2021-06-28 09:13:48 來源:億速云 閱讀:309 作者:小新 欄目:移動開發(fā)

小編給大家分享一下Android studio 3.6.1出現(xiàn)Cause: unable to find valid certification path to requested target報錯怎么辦,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

1、首先修改根目錄下的build.gradle成如下格式

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
  repositories {
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.6.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}
allprojects {
  repositories {
//    google()
//    jcenter()
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  }
}

2、然后點擊sync project with gradle files,如下圖所示

Android studio 3.6.1出現(xiàn)Cause: unable to find valid certification path to requested target報錯怎么辦

3、 如果再次報錯請清理緩存并重啟AS,方法如下圖

Android studio 3.6.1出現(xiàn)Cause: unable to find valid certification path to requested target報錯怎么辦

4、(最重要的步驟)如果再次報錯,請不厭其煩的且厚不要臉的多次點擊這個小象(即重復(fù)第二步操作),正常情況下奇跡會發(fā)生的。(反正我是見證該奇跡了)

以上是“Android studio 3.6.1出現(xiàn)Cause: unable to find valid certification path to requested target報錯怎么辦”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI