Recycler视图崩溃

时间:2015-10-11 15:08:01

标签: android android-recyclerview

当我使用recyclerview时,应用程序崩溃

C:\Program Files (x86)\Telerik\UI for ASP.NET MVC Q2 2015\wrappers\aspnetmvc\EditorTemplates\razor

错误文字:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout         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:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true" tools:openDrawer="start">

<include layout="@layout/app_bar_issuehome" android:layout_width="match_parent"
    android:layout_height="match_parent" />

<android.support.design.widget.NavigationView android:id="@+id/nav_view"
    android:layout_width="wrap_content" android:layout_height="match_parent"
    android:layout_gravity="start" android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_issuehome"
    app:menu="@menu/activity_issuehome_drawer" />
<android.support.v7.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/recyclerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    />

2 个答案:

答案 0 :(得分:0)

你添加了

吗?
compile 'com.android.support:recyclerview-v7:23.0.1'

到app build.gradle中的依赖项{}?

答案 1 :(得分:0)

你有没有

com.android.support:recyclerview-v7:23.0.1

在你的gradle脚本中?