0

为 ListView 充气时出现错误。

它说 android.view.InflateException: Binary XML file line #7: Error inflating class

但是在第 7# 行只有一个 TextView。这是xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/statement_date"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:textIsSelectable="true"
        android:textSize="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/statement_amount"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/statement_description"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
4

1 回答 1

0

android:textSize="?android:attr/textAppearanceMedium" />应该android:textAppearance="?android:attr/textAppearanceMedium" />在你的第一个里面<TextView吗?

于 2013-09-05T22:14:30.830 回答