關(guān)于Android Studio同步一直報(bào)錯(cuò)問(wèn)題

像這種:

> Failed to transform kotlin-stdlib-common-1.8.22.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22) to match attributes {artifactType=android-jni, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not download kotlin-stdlib-common-1.8.22.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22)
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.8.22/kotlin-stdlib-common-1.8.22.jar'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.8.22/kotlin-stdlib-common-1.8.22.jar'.
               > repo.maven.apache.org

這種:
Connection reset

這種:
could not download xxx.aar : skipped due to earlier error

這種:
Android Libraries fail to resolve with https://jitpack.io

等等還有很多種類似問(wèn)題。。。
都是倉(cāng)庫(kù)下載不下來(lái),同步失敗

我自己電腦折騰了好多天,關(guān)掉代理,注釋這些

systemProp.http.proxyHost=
systemProp.http.proxyPort=
systemProp.https.proxyHost=
systemProp.https.proxyPort=

設(shè)置maven倉(cāng)庫(kù)地址,阿里云等等

都沒(méi)能解決

最后
最后
最后
魔法上網(wǎng)(鄭重提醒:魔法上網(wǎng)只是為了學(xué)習(xí)技術(shù))

1.找到代理地址和端口
控制面板(搜索框輸入)-> 網(wǎng)絡(luò)和Internet -> Internet選項(xiàng) -> 連接(在頂部狀態(tài)欄) -> 局域網(wǎng)設(shè)置,就可以看到地址和端口了

2.Android Studio settings 設(shè)置 HTTP Proxy
手動(dòng)設(shè)置代理

image.png

把地址和端口號(hào)填進(jìn)去, 確定

同步 (如果其間出現(xiàn)別的錯(cuò),不要慌,大概率不是上面那些原因,照著錯(cuò)誤解決就可以了)

image.png

終于成功了,曾一度氣的想砸東西(鬼東西代理)

記錄一下,希望能幫到大家

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容