1. In xml
<android.support.v7.widget.RecyclerView android:id="@+id/forecast_list" android:layout_width="match_parent" android:layout_height="match_parent"/>
2.In Gradle:
compile "com.android.support:recyclerview-v7:26.1.0"
Note: The version is the same as appcompat-v7:26.1.0
implementation 'com.android.support:appcompat-v7:26.1.0'