基于Android Studio 3.1.2
第一步:app/build.gradle 文件中添加依赖 版本号跟android-support-v7包一致
implementation 'com.android.support:recyclerview-v7:27.1.1'
//Glide图片加载库
implementation 'com.github.bumptech.glide:glide:4.2.0'
第二步:在activity_main.xml中添加布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_