Use RecyclerView in Earlier Android Versions
I want to use RecyclerView in my android app. Below are the properties:
minSdkVersion="14" (ICS)
compile sdk version="21" (L)
Target sdk version="14" (ICS)
I added compile 'com.android.support:appcompat-v7:21.0.3'
under dependencies in build.gradle file. When I add the RecyclerView to XML I get the following error:
The following classes could not be found:
- android.support.v7.widget.RecyclerView (Fix Build Path, Create Class)
XML code:
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
I want the app to run on all devices above ICS. Please help me to solve this problem.
+3
source to share