【发布时间】:2018-05-14 12:05:58
【问题描述】:
我是 android 开发新手,刚刚按照本教程在 android studio 3.2 (canary) 中创建了我的第一个“hello world”项目。 https://developer.android.com/jetpack/docs/getting-started
然后我只是做了 Build-> make project 项目尝试构建并给了我以下错误。
无法为 org.gradle.api.Project 类型的根项目“JetpackHelloWorld”获取未知属性“archLifecycleVersion”。
更新
依赖关系
以下是我的应用程序文件夹 build.gradle 文件中的依赖项标记
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'
}
【问题讨论】:
标签: android android-studio kotlin android-jetpack