我正在嘗試在 android studio 中創(chuàng)建一個房間數(shù)據(jù)庫。但是當我構(gòu)建項目時,出現(xiàn)“Could not find android.arch.lifecycle:compailer:1.1.1”這個錯誤。我的 gradle 版本是 3.4.1 android studio 版本是 3.4.1 我正在使用 java 作為編程語言。有人能幫幫我嗎我在網(wǎng)上搜索了這個錯誤,但找不到任何東西。''' 我的 gradle 文件:應(yīng)用插件:'com.android.application'android {compileSdkVersion 28defaultConfig { applicationId "com.company.archroomdatabase" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro' } } }dependencies {def lifecycle_version = "1.1.1"def room_version = "1.1.1"implementation fileTree(dir: 'libs', include: ['*.jar'])implementation 'com.android.support:appcompat-v7:28.0.0'implementation 'com.android.support:design:28.0.0'implementation 'com.android.support:cardview-v7:28.0.0'implementation 'com.android.support.constraint:constraint-layout:1.1.3'test?mplementation 'junit:junit:4.12'androidTest?mplementation 'com.android.support.test:runner:1.0.2'androidTest?mplementation 'com.android.support.test.espresso:espresso-core:3.0.2'//lifecycle componentsimplementation "android.arch.lifecycle:extensions:$lifecycle_version"annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"//Room componentsimplementation "android.arch.persistence.room:runtime:$room_version"annotationProcessor "android.arch.persistence.room:compiler:$room_version"}
1 回答

POPMUISE
TA貢獻1765條經(jīng)驗 獲得超5個贊
你寫錯了,不是
annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"
它是
annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"
添加回答
舉報
0/150
提交
取消