如何添加RecyclerView依赖 – gradle 3

我已经开始与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,我不能找到如何使用它。

尝试添加:

 implementation 'com.android.support:recyclerview-v7:26.0.0-beta1' 

做如下所示:

 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' compile 'com.android.support:recyclerview-v7:26.0.0-beta1' }