gpt4 book ai didi

android-gradle-plugin - Android Studio 4.2 - Kotlin 1.5.0 版错误和无休止地加载项目结构窗口中的建议

转载 作者:行者123 更新时间:2023-12-04 11:13:00 25 4
gpt4 key购买 nike

这是什么意思?
enter image description here
enter image description here
我试图改变 ext.kotlin_version = '1.5.0'ext.kotlin_version = '1.5.0-release-764'但在这种情况下,gradle 项目无法使用 Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764. 构建
更新 ext.kotlin_version = '1.5.0' - 也不起作用,同样的错误和警告
构建.gradle:

buildscript {
ext.kotlin_version = '1.5.0'

repositories {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
}
}
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

Could not resolve all artifacts for configuration ':classpath'.Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0.Searched in the following locations:- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0/kotlin-gradle-plugin-1.5.0.pomIf the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need toadjust the 'metadataSources { ... }' of the repository declaration.


更新 2
我不得不添加 mavenCentral()使其工作,虽然警告仍然存在,但它会建立
如果 4.2 版本在更新一个依赖项的版本后在“项目结构”窗口中无限加载建议,那么另一个问题
enter image description here

最佳答案

他们发布了新版本 202-1.5.10-release-894-AS8194.7现在它可以正常工作,没有任何警告:ext.kotlin_version = '1.5.10'虽然我没有检查第二个问题

endless loading for suggestions in Project Structure window

关于android-gradle-plugin - Android Studio 4.2 - Kotlin 1.5.0 版错误和无休止地加载项目结构窗口中的建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67415536/

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