android jetpack项目给出了archlifecycleversion构建错误 [英] android jetpack project gives archlifecycleversion build error
问题描述
我是Android开发的新手,并按照本教程在android studio 3.2(canary)中创建了我的第一个"hello world"项目. https://developer.android.com/jetpack/docs/getting-started
I am new to android development and just created my first "hello world" project in android studio 3.2 ( canary ) following this tutorial. https://developer.android.com/jetpack/docs/getting-started
然后我只是做了 Build-> make project 项目尝试构建,并给了我以下错误.
and then I just did Build- > make project project tried to build and gave me following error.
无法获取类型为org.gradle.api.Project的根项目'JetpackHelloWorld'的未知属性'archLifecycleVersion'.
Could not get unknown property 'archLifecycleVersion' for root project 'JetpackHelloWorld' of type org.gradle.api.Project.
更新
依赖项
以下是我的应用程序文件夹build.gradle文件中的依赖项标记
following is the dependencies tag in my app folder build.gradle file
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation "android.arch.lifecycle:extensions:$rootProject.archLifecycleVersion"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
推荐答案
用实际版本替换$rootProject.archLifecycleVersion
,我想现在是1.1.1
Replace $rootProject.archLifecycleVersion
with actual version, i guess this is 1.1.1 right now
这篇关于android jetpack项目给出了archlifecycleversion构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!