我想構建時收到以下訊息:
e: This version (1.0.1) of the Compose Compiler requires Kotlin version 1.5.21
but you appear to be using Kotlin version 1.5.30 which is not known to be compatible.
Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details
* 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
BUILD FAILED in 713ms
有人知道如何更改版本嗎?
任何幫助表示感謝??
uj5u.com熱心網友回復:
您必須在專案級 build.gradle 檔案中更改 Kotlin 版本:
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21'
}
并且也在應用級的 build.gradle 檔案中。
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21'
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/441083.html
標籤:安卓工作室
