技术小黑屋

Could Not Find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764 问题解决

最近新创建的 Android Studio 项目,都报这样的问题。

问题日志

1
2
3
4
5
6
7
8
9
10
11
A problem occurred configuring root project 'TooLargeToolSample'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
       - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

解决方法

将build.gradle 中的文件内容

1
2
buildscript {
    ext.kotlin_version = "1.5.0-release-764"

修改为如下即可。

1
2
buildscript {
    ext.kotlin_version = "1.5.0"




快来解锁最新版 Typora,新用户券后仅需 84 元!
如何便宜的购买 office 365 ?
新版赤友 NTFS 助手来袭,正版超低价