gpt4 book ai didi

java - 找不到 android.arch.lifecycle :compailer:1. 1.1 错误

转载 作者:行者123 更新时间:2023-12-02 03:23:58 25 4
gpt4 key购买 nike

我正在尝试在 android studio 中创建一个房间数据库。但是当我构建项目时,我出现“无法找到 android.arch.lifecycle:compairer:1.1.1”这个错误。

我的gradle版本是3.4.1android 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:compairer: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

要求: 项目:应用程序

最佳答案

你写错了,不是

annotationProcessor "android.arch.lifecycle:compailer:$lifecycle_version"

这是

annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"

关于java - 找不到 android.arch.lifecycle :compailer:1. 1.1 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56915343/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com