首页 > 解决方案 > 未找到 Kotlin 插件

问题描述

我已经从 Github 克隆了 android mapbox 地图。在这里找到:

https://github.com/mapbox/mapbox-maps-android/

开箱即用,我收到以下我无法解决的错误:

构建文件 'C:\Development\mapbox-maps-android\mapbox-lint\build.gradle' 行:3

在以下任何来源中都找不到插件 [id: 'kotlin']:

  • 尝试:使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。

  • 例外是:org.gradle.api.plugins.UnknownPluginException:插件 [id: 'kotlin'] 未在以下任何来源中找到:

所有文件都与 Github 存储库中当前的文件相同。

构建.Gradle:

plugins {
    id 'java-library'
    id 'kotlin'
    id 'com.android.lint'
}

lintOptions {
    htmlReport true
    htmlOutput file("lint-report.html")
    textReport true
    absolutePaths false
    ignoreTestSources true
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
    compileOnly(Dependencies.lintApi)
    compileOnly(Dependencies.lintChecks)
    compileOnly(Dependencies.kotlin)
    testImplementation(Dependencies.junit)
    testImplementation(Dependencies.lint)
    testImplementation(Dependencies.lintTests)
    testImplementation(Dependencies.testUtils)
}
project.apply {
    from("$rootDir/gradle/ktlint.gradle")
}

标签: androidandroid-studiokotlinpluginsmapbox

解决方案


推荐阅读