我想在我的Android应用程序中使用RecyclerView。以下是一些属性:
minSdkVersion="14" (ICS)
compile sdk version="21" (L)
Target sdk version="14" (ICS)
我在build.gradle文件中的dependencies下添加了
compile 'com.android.support:appcompat-v7:21.0.3'
。
当我在XML中添加RecyclerView时,出现了以下错误:The following classes could not be found:
- android.support.v7.widget.RecyclerView (Fix Build Path, Create Class)
XML 代码:
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
我希望这个应用程序能在所有ICS以上的设备上运行。请帮助我解决这个问题。
appcompat
v7库。 - Steve