Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '4.2.1'] was not found in any of the following sources:

Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '2.3.3'] was not found in any of the following sources:

Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Included Builds (None of the included builds contain this plugin)
Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.3.3')
Searched in the following repositories:
Gradle Central Plugin Repository

 

发现 .gradle下 gradle.properties中 不知什么时候配置了代理:

systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=1080

删除 重新运行即可。

 

 1 FAILURE: Build failed with an exception.
 2 
 3 * Where:
 4 Settings file 'E:\workspace_self\libstudy\libstudy-dart\libstudy-flutter\libstudy_flutter_qzlm\libstudy_flutter_qzlm_demo_relearn\android\settings.gradle.kts' line: 20
 5 
 6 * What went wrong:
 7 Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
 8 > A problem occurred configuring project ':gradle'.
 9    > Could not resolve all artifacts for configuration 'classpath'.
10       > Could not download kotlin-gradle-plugin-2.0.21-gradle85.jar (org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21)
11          > Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/2.0.21/kotlin-gradle-plugin-2.0.21-gradle85.jar'.
12             > Could not GET 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/2.0.21/kotlin-gradle-plugin-2.0.21-gradle85.jar'.
13                > Got socket exception during request. It might be caused by SSL misconfiguration
14                   > Connect to 127.0.0.1:1080 [/127.0.0.1] failed: Connection refused: getsockopt
15       > Could not download kotlin-gradle-plugin-idea-proto-2.0.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:2.0.21)
16          > Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/2.0.21/kotlin-gradle-plugin-idea-proto-2.0.21.jar'.
17             > Could not GET 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/2.0.21/kotlin-gradle-plugin-idea-proto-2.0.21.jar'.
18                > Got socket exception during request. It might be caused by SSL misconfiguration
19                   > Connect to 127.0.0.1:1080 [/127.0.0.1] failed: Connection refused: getsockopt
20       > Could not download kotlin-compiler-embeddable-2.0.21.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:2.0.21)
21          > Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-compiler-embeddable/2.0.21/kotlin-compiler-embeddable-2.0.21.jar'.
22             > Could not GET 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-compiler-embeddable/2.0.21/kotlin-compiler-embeddable-2.0.21.jar'.
23                > Got socket exception during request. It might be caused by SSL misconfiguration
24                   > Connect to 127.0.0.1:1080 [/127.0.0.1] failed: Connection refused: getsockopt
25 
26 * Try:
27 > Run with --stacktrace option to get the stack trace.
28 > Run with --info or --debug option to get more log output.
29 > Run with --scan to get full insights.
30 > Get more help at https://help.gradle.org.
31 
32 BUILD FAILED in 20s
33 [!] Gradle threw an error while downloading artifacts from the network.

 

posted @ 2025-12-19 19:23  sikewang  阅读(2)  评论(0)    收藏  举报