ฉันสร้างโครงการเขียน Jetpack สดใหม่อย่างสมบูรณ์ (จากเทมเพลตโครงการ) ด้วย Android Studio 4.0 Canary 6 และฉันพยายามเพิ่มการอ้างอิงของห้อง นี่คือระดับแอปของฉันbuild.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.composewithroom"
        minSdkVersion 29
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        compose true
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    implementation 'androidx.ui:ui-framework:0.1.0-dev03'
    implementation 'androidx.ui:ui-layout:0.1.0-dev03'
    implementation 'androidx.ui:ui-material:0.1.0-dev03'
    implementation 'androidx.ui:ui-tooling:0.1.0-dev03'
    implementation "androidx.room:room-runtime:2.2.2"
    implementation "androidx.room:room-ktx:2.2.2"
    kapt "androidx.room:room-compiler:2.2.2" // e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
ฉันได้รับข้อผิดพลาดนี้เมื่อพยายามสร้าง:
e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
สิ่งนี้สามารถเป็นได้ทั้ง "คงที่" โดยการลบkapt "androidx.room:room-compiler:2.2.2"หรือปิดการเขียนcompose true
ไม่มีใครมีความคิดวิธีการแก้ไขปัญหานี้หรือเป็นฐานข้อมูลห้องพักใช้ไม่ได้กับการเขียนในขณะนี้?
compose = trueด้วยkapt "androidx.databinding"และได้รับข้อผิดพลาดเดียวกัน อาจเป็นเพียงการเขียนที่ไม่เข้ากันกับ kapt