java - 找不到 android.arch.lifecycle:compailer:1.1.1 错误
问题描述
我正在尝试在 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"}
我的毕业项目文件:
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
解决方案
你写错了,不是
annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"
它是
annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"
推荐阅读
- python - 通过 API 获取 OneNote 时间戳
- java - Android MediaPlayer:Android Q 及更高版本中的文件访问
- javascript - 当我的 JavaScript 依赖于以前加载的脚本中的对象时,我如何`eslint`?
- python - 激活 conda 环境后我是否必须激活 venv 才能使 pip 正常工作?
- css - reactstrap - 我怎样才能改变颜色
的(点击左右滑动照片的小箭头)? - angular - SpringBoot 后端和 Angular 前端之间的实时绑定
- c - fread 超过 8 个字节的动态分配的缓冲区失败
- c - c中的IPv6服务器-recvfrom失败
- mysql - 在案例查询中显示偶数空值
- python - 尝试微调 restNet50 模式问题