1. 问题
e: This version (1.3.2) of the Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin version 1.9.0-Beta which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
代码如下:
(工程下的build.gradle)
plugins {
id 'com.android.application' version '8.0.1' apply false
id 'com.android.library' version '8.0.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0-beta' apply false
}
2.处理
更改为1.7.20 即可
或者更改build.gradle(app)中的以下版本:
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
}
版本兼容关系参考链接:https://developer.android.com/jetpack/androidx/releases/compose-kotlin?hl=zh-cn