我正在尝试在android studio中创建一个会议室数据库。但是,当我构建项目时,出现了“找不到android.arch.lifecycle:compailer:1.1.1”错误。
我的gradle版本是3.4.1 android studio版本是3.4.1 我正在使用Java作为编程语言。 有人可以帮助我
我在网上搜索了此错误,但找不到任何内容。
''' 我的gradle文件: 应用插件:“ com.android.application”
android {
compileSdkVersion 28
defaultConfig {
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 components
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"
//Room components
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"}
我的gradle项目文件:
buildscript {
repositories {
google()
jcenter()
maven { url 'http://repo1.maven.org/maven2' }
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是错误:
找不到android.arch.lifecycle:compailer:1.1.1
在以下位置搜索: -https://dl.google.com/dl/android/maven2/android/arch/lifecycle/compailer/1.1.1/compailer-1.1.1.pom -https://dl.google.com/dl/android/maven2/android/arch/lifecycle/compailer/1.1.1/compailer-1.1.1.jar -https://jcenter.bintray.com/android/arch/lifecycle/compailer/1.1.1/compailer-1.1.1.pom -https://jcenter.bintray.com/android/arch/lifecycle/compailer/1.1.1/compailer-1.1.1.jar
要求: 项目:app
答案 0 :(得分:0)
您拼写错误,不是
annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"
是
annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"