【问题标题】:Could not find kotlin plug-in找不到 kotlin 插件
【发布时间】:2021-07-29 17:13:02
【问题描述】:

新建项目后Android Studio出现如下错误???

我该怎么办?

A problem occurred configuring root project 'StartActivity'.

无法解析配置“:classpath”的所有工件。 找不到 org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764。

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

【问题讨论】:

标签: android-studio kotlin


【解决方案1】:

当前的解决方法是在项目的 build.gradle 文件中将版本“1.5.0-release-764”替换为版本“1.5.0”。

Android 4.2.1 在创建新的 Kotlin 项目时已修复此问题,但对于旧项目,您必须更换版本。 它应该在 kotlin 1.5.1 上修复 https://youtrack.jetbrains.com/issue/KTIJ-11590

【讨论】:

    猜你喜欢
    • 2020-09-15
    • 2021-03-06
    • 1970-01-01
    • 1970-01-01
    • 2018-09-11
    • 2013-12-08
    • 2013-05-24
    • 2016-04-25
    相关资源
    最近更新 更多