[英]How to solve the exception "The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher."
[英]The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. Can't find the path to 'location'
我在为 flutter 项目构建 APK 时遇到了这个错误。
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':location' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
我的 android/build.gradle 文件是
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
//noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我找不到需要更改 kotlin-gradle-plugin 版本的位置。 请帮忙。
我尝试更改 ext.kotlin_version 但似乎没有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.