【发布时间】:2014-10-20 12:26:41
【问题描述】:
我已经用 Android 5.0 (API 21) 更新了我的 android SDK;我还更新了平台工具和构建工具。
在布局 xml 文件中添加 RecycleView 后,我收到 The following classes could not be found:
- android.support.v7.widget.RecyclerView (Fix Build Path, Edit XML, Create Class) 错误。
我的布局 xml 文件如下所示:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.androidlintro.MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
谁能告诉我出了什么问题。为什么即使在下载完整的软件集(新的 SDK、构建工具、平台工具等)后我也会收到此错误
注意:我使用的是eclipse IDE
【问题讨论】:
标签: android xml android-5.0-lollipop