我連接了firebase,我收到了這個錯誤。我該如何解決?(類'com.google.firebase.auth.ktx.AuthKt'是用不兼容的版本編譯的Kotlin。其元資料的二進制版本是1.7.1,預期版本是1.5.1。)
build.gradle:
buildscript {
ext {
compose_version = '1.1.0-beta01'
}
dependencies {
classpath 'com.google.gms:google-services:4.3.13'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
uj5u.com熱心網友回復:
嘗試將 kotlin 版本從 1.7.1 降級到 1.5.1。您當前的版本導致了這個問題,因為 firebase auth 依賴項與您當前的 kotlin 版本不兼容。
uj5u.com熱心網友回復:
在您的專案級打開build.gradle檔案中,將ext.kotlin_version您擁有的任何當前版本增加到最新的穩定版本1.7.10。
您可以從這里獲取最新版本:
https://kotlinlang.org/docs/releases.html#release-details
uj5u.com熱心網友回復:
最近我有同樣的問題,
我通過以下步驟進行了修復。
專案 Gradle
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
or
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
應用程式分級
implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
您可以在以下執行緒中找到更多詳細資訊。 模塊是使用不兼容的 Kotlin 版本編譯的。其元資料的二進制版本是 1.5.1,預期版本是 1.1.15
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/503832.html
標籤:Google Cloud Collective 安卓 火力基地 科特林 毕业典礼
下一篇:當使用flutter_blue包并嘗試構建androidappBuild失敗并出現例外。僅當我匯入此包時才會發生這種情況
