无法解析org.jetbrains.Kotlin:kotlin-gradle-plugin:1.7.20.在flutter中[已关闭]

mxg2im7a  于 2022-12-19  发布在  Kotlin
关注(0)|答案(2)|浏览(765)

**已关闭。**此问题需要debugging details。当前不接受答案。

编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
2天前关闭。
Improve this question
当我运行flutter run时,我得到这个错误:

FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':assets_audio_player'.
    > Could not resolve all artifacts for configuration ':assets_audio_player:classpath'.
       > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20.

gradle-wrapper.properties:distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
更新应用程序/构建版本.gradle


x 1c 4d 1x有人知道如何解决它吗?谢谢先进

mgdq6dx1

mgdq6dx11#

你试过升级你的Kotlin版本吗?

ext.kotlin_version = '1.7.20'
nc1teljy

nc1teljy2#

您能否尝试将Gradle Wrapper更新到7.6并将Kotlin更新到1.7.10(或1.7.20)?
https://docs.gradle.org/current/userguide/compatibility.html
还有

classpath 'com.android.tools.build:gradle:3.5.4'

已经很老了
尝试

classpath  'com.android.tools.build:gradle:7.1.2'

您需要确保Gradle Wrapper、Kotlin版本以及您正在使用或添加到类路径中的所有插件彼此兼容,否则可能会出现奇怪的错误。

相关问题