简体   繁体   English

Android Studio 无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10

[英]Android Studio could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10

Thank you for taking the time to read this.感谢您抽出时间来阅读。

The Problem问题

I have been working on an app for sometime and it has been working fine until I tried to add a settings fragment via the "nav_graph".我一直在开发一个应用程序,它一直运行良好,直到我尝试通过“nav_graph”添加一个设置片段。 After I add it I am presented with a gradle error that on the surface seems simple enough but I have been unable to find the cause.添加后,我看到一个 gradle 错误,表面上看起来很简单,但我一直找不到原因。 If I revert the changes ie remove the settings fragment then my app builds again.如果我恢复更改,即删除设置片段,那么我的应用程序将再次构建。

The Error错误

Could not resolve all artifacts for configuration ':classpath'.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
The consumer was configured to find a runtime of a component compatible with Java 11, packaged as a jar, and its dependencies declared externally. However we cannot choose between the following variants of org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10:

在此处输入图像描述

My Thoughts我的想法

To me it seems like I need to select the correct variant compatible with Java 11?对我来说,似乎我需要 select 与 Java 11 兼容的正确变体? but I have not found how.但我还没有找到如何。 I initially thought that one of my "implementations" might have been causing it but if I revert adding the settings fragment everything builds and works.我最初认为我的一个“实现”可能是导致它的原因,但如果我恢复添加设置片段,一切都会构建和工作。 I could use Shared Preferences instead but I have decided not to as it is now depreciated.我可以改用共享首选项,但我决定不这样做,因为它现在已经贬值了。

Any ideas would be a great help.任何想法都会有很大帮助。 Many thanks.非常感谢。

Update your gradle version in build.gradle and gradle-wrapper.properties If you build by Android Studio, go to File -> Invalidate Caches and then try again after Android Studio restarted Update your gradle version in build.gradle and gradle-wrapper.properties If you build by Android Studio, go to File -> Invalidate Caches and then try again after Android Studio restarted

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android - 无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0 - Android - Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0 react-native-webview 无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11 - react-native-webview Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11 无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10 - Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10 没有 org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21 的缓存版本可用于离线模式错误 - No cached version of org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21 available for offline mode Error Android Studio-找不到org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2 - Android Studio - Could not find org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2 IONIC ISSUE无法解析org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2 - IONIC ISSUE Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2 无法解决:org.jetbrains.kotlin:kotlin-stdlib - Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib Gradle 构建失败:找不到 org.jetbrains.kotlin 即使我没有使用 Kotlin - Gradle build failed : could not find org.jetbrains.kotlin even if I haven't used Kotlin 更新到Android Studio 3.1后,我遇到此错误:找不到org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0 - After update to Android Studio 3.1 I'm facing this error: Could not find org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0 错误:找不到 org.jetbrains.kotlin:kotlin-stdlib-jre8:1.3.10。 在 Android Studio 3.3 RC 1 - Error : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre8:1.3.10. in Android Studio 3.3 RC 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM