【发布时间】:2017-10-31 13:21:30
【问题描述】:
我已经开始使用 android 和 Kotlin,但在创建 RecyclerView 时遇到了问题。到目前为止,我看到的是我有一个新的 gradle 版本,但我不知道如何包含我需要的依赖项。
您可以在下面看到我对 build.gradle (app) 的依赖项的外观
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}
我猜问题出在依赖的 RecyclerView 中,我找不到如何使用它。
【问题讨论】:
-
你试过这个
compile 'com.android.support:recyclerview-v7:25.3.1'吗? -
你仍然可以在 Gradle 3.0 版中使用
compile
标签: android gradle android-gradle-plugin kotlin