如果 classpath 無法獲取(第一次 classpath 沒有下載园蝠,其實如果有的話直接命中緩存了)赁豆,你嘗試了:
- 在 AS 中設(shè)置 proxy
- 清除緩存
- 使用阿里云鏡像
這些都不管用的話可以看下這里擅耽。
或者執(zhí)行 gradle 的時候出現(xiàn)這樣的問題:
Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '1.3.4'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:1.3.4')
Searched in the following repositories:
Gradle Central Plugin Repository
我也遇到這個問題,經(jīng)過搜索看到這里
csdn
找到 gradle 的全局配置 ~/.gradle/gradle.properties
里面如果有設(shè)置全局代理馆蠕,刪掉
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7891
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7891