在遵循自述文件和正确的配置(android)后,我正在使用 auth0_flutter 包在 Flutter 中执行 auth0 我收到一个构建错误:
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
在互联网上找到解决方案后,我到达了这样的地步:我需要更改构建块内的 android 级别 build.gradle 文件内的 Kotlin 版本,尽管该块不存在,并且我手动添加了
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
// Add any necessary dependencies here
}
ext.kotlin_version = '1.7.1'
}
我使用过不同版本的 Kotlin,但仍然遇到相同的错误,
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0' // change according to your version
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" ]
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}