Jetpack使用Firebase撰写编译错误

问题描述

我跟随Google guidlines在我的项目中设置撰写,这是我的应用级build.gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    defaultConfig {
        applicationId "com.super.note"
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        versionCode rootProject.versionCode
        versionName rootProject.versionName

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
        useIR = true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
        }
    }

    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion Versions.compose
    }
}

dependencies {
    implementation fileTree(dir: "libs",include: ["*.jar"])
    implementation Kotlin.stdlib
    implementation AndroidX.coreKtx
    implementation AndroidX.appcompat
    implementation AndroidX.constraintLayout
    implementation AndroidX.recyclerView
    implementation Lifecycle.extensions
    implementation Lifecycle.livedata
    implementation Material.core
    implementation AndroidX.legacySupport
    androidTestImplementation "androidx.test.ext:junit:$junit_android_version"

    //fragment androidx
    implementation AndroidX.fragment
    implementation AndroidX.fragmentKtx

    //navigation
    implementation Navigation.fragment
    implementation Navigation.uiKtx

    //Debugging
    implementation Debug.timber

    //lottie
    implementation Animation.lottie

    //Hilt DI
    implementation Di.hiltAndroid
    kapt Di.hiltCompiler
    implementation Di.hiltViewModel
    kapt Di.hiltAndroidX

    //compose
    implementation Compose.core
    implementation Compose.material
    implementation Compose.tooling

    implementation project(":domain")
    implementation project(":data")
}

尝试构建此错误消息:

e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;

我使用Firebase,hilt和corutine并使用Android Studio 4.2 Canary构建项目。

有人有解决此问题的想法吗?或者我目前无法使用firebase和google播放corutine与compose吗?谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...