gpt4 book ai didi

Android Studio 4.2 Kotlin 插件问题

转载 作者:行者123 更新时间:2023-12-04 23:35:55 24 4
gpt4 key购买 nike

由于以下错误,无法使用 Android Studio 4.2 构建新项目:

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
当我从 ext.kotlin_version = "1.5.0-release-764" 更改 Kotlin 插件版本时至 ext.kotlin_version = "1.5.0"应用程序构建成功,但出现以下警告:
Kotlin version that is used for building with Gradle (1.5.0) differs from the one bundled into the IDE plugin (1.5.0-release-764) 
enter image description here

最佳答案

更改

buildscript {
ext.kotlin_version = "1.5.0-release-764"
......}
更改为
buildscript {
ext.kotlin_version = "1.5.0"
....}
更改 Kotlin 版本问题将被清除。

关于Android Studio 4.2 Kotlin 插件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67401693/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com