更新到Android Studio 4.2后无法创建新的Kotlin项目 [英] Can't create new Kotlin project after updating to Android Studio 4.2

查看:401
本文介绍了更新到Android Studio 4.2后无法创建新的Kotlin项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更新了Android Studio 4.2,但无法创建新项目kotlin

I updated Android studio 4.2 but I wasn't able to create new project kotlin

A problem occurred configuring root project 'My Application'.
> 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

推荐答案

错误很明显Gradle无法找到您声明的库

The error is clear Gradle was unable to find the library that you declared

可能的解决方法

位置

项目->build.gradle

Project -> build.gradle

//update it
dependencies {
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
}

编辑昨晚,kotlin发布了1.5.0版的稳定版本,您可以使用此版本保持最新状态

Edited kotlin has released stable version of version 1.5.0 last night you can use this version to stay up-to-date

dependencies {
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
}

这篇关于更新到Android Studio 4.2后无法创建新的Kotlin项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆