Android.view.inflateException二进制XML文件行#7错误输出类<unknown> </unknown>

时间:2014-03-25 06:36:22

标签: android xml

之前已经问过这个问题。问题是一样的,但答案无法解决我的问题。 这个问题Unknown error while using DrawerLayout?有像我一样的问题,我尝试了给出的步骤,但没有运气。我有布局文件: activity_main.xml中:

<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>  

<!-- as the main content the following view takes the whole space for content display..using match_parent in both the sections -->

<FrameLayout

    android:id="@+id/content_frame"
    android:layout_height="match_parent"
    android:layout_width="match_parent" 
    />

<!-- android:layout_gravity="start" tells the Drawerlayout to treat this as the sliding drawer on the left side for the left-to-right 
language...and on right side for the right-to-left languages..a solid contrast is used to differentiate it from the content view.. -->

<ListView
    android:id="@+id/left_drawer"
    android:layout_width="240dp"
    android:layout_height="wrap_content"
    android:layout_gravity="start"
    android:dividerHeight="0dp"
    android:background="#ffff"
    />
</android.support.v4.widget.DrawerLayout>

logcat说android.view.InflateException:Binary XML file line #7:Error inflating class<unknown> .. 我已经添加了支持库并尝试了解决该问题的解决方案,但我无法解决问题..

0 个答案:

没有答案