Android 我在手机上收到错误,但在模拟器上工作正常

Android 我在手机上收到错误,但在模拟器上工作正常,android,android-emulator,Android,Android Emulator,我在手机上运行应用程序时出错,但当我通过模拟器启动应用程序时,它工作正常。Emulator在与我的手机相同的2.1 froyo上运行 我得到的错误是 android.view.InflateException: Binary XML file line #5: Error inflating class <unknown> 当我试图夸大这一观点时。顺便说一句,在我的xml代码中,evrything是可以的,否则它也不能在emulator上工作 但如果你认为这是我的帮助,那就

我在手机上运行应用程序时出错,但当我通过模拟器启动应用程序时,它工作正常。Emulator在与我的手机相同的2.1 froyo上运行

我得到的错误是

    android.view.InflateException: Binary XML file line #5: Error inflating class <unknown>
当我试图夸大这一观点时。顺便说一句,在我的xml代码中,evrything是可以的,否则它也不能在emulator上工作

但如果你认为这是我的帮助,那就是:

    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >
    <TableRow
        android:layout_width="fill_parent"
        android:layout_height="15dp"
        android:background="@drawable/bg_seznam" >
        <TextView
            android:id="@+id/item_title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="17dp"
            android:textColor="#ffffff"
            android:textSize="20dp"
            android:textStyle="bold"
            android:typeface="serif" >
        </TextView>         
    </TableRow>
    <TableRow
        android:layout_width="fill_parent"
        android:paddingBottom="5dp"
        android:paddingTop="5dp" >
        <TextView
            android:id="@+id/item_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.6"
            android:ellipsize="end"
            android:maxLines="1"
            android:paddingLeft="17dp"
            android:scrollHorizontally="true"
            android:singleLine="false"
            android:textSize="18dp"
            android:textStyle="bold"
            android:typeface="serif" >

        </TextView>            

        <TextView
            android:id="@+id/item_distance"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:ellipsize="end"
            android:maxLines="1"
            android:scrollHorizontally="true"
            android:singleLine="false"
            android:textColor="#3b5688"
            android:textSize="18dp"
            android:textStyle="bold"
            android:typeface="serif" >

        </TextView>            



        <ImageView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.1"
            android:contentDescription="@string/hello_world"
            android:src="@drawable/naprej" />


    </TableRow>


    </TableLayout>
解决了

我试着做些与众不同的事情,结果,整个问题是我的形象bg_seznam出了问题。我不知道为什么,但不知怎么的,它太小了。我把它放在xhdpi文件夹中。我所做的只是将它的大小调整到正常值的两倍,现在它就像一个符咒


Tenx需要帮助CFlex,没有你对logcat的想法,我不会成功

请发布整个堆栈跟踪。我不完全了解这是如何完成的:如果您刚刚放入
错误膨胀类
,请发布logcat的其他行。我从Error.tostring()中截取了这行,在我的logcat中有很多行,所以我不知道哪些行是有用的…我得到的信息是,logcat的这些行中经常重复08-08 10:23:46.999:E/libgps(173):onUnsol:cmd 0x04 plen 57 08-08 10:23:46.999:E/libgps(173):oem_unsol_gps_测量:num_sv 0 08-08 10:23:46.999:E/libgps(173):oem\U UNSU\U gps\U测量:在\U fix\U掩码0000014E中使用
    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >
    <TableRow
        android:layout_width="fill_parent"
        android:layout_height="15dp"
        android:background="@drawable/bg_seznam" >
        <TextView
            android:id="@+id/item_title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="17dp"
            android:textColor="#ffffff"
            android:textSize="20dp"
            android:textStyle="bold"
            android:typeface="serif" >
        </TextView>         
    </TableRow>
    <TableRow
        android:layout_width="fill_parent"
        android:paddingBottom="5dp"
        android:paddingTop="5dp" >
        <TextView
            android:id="@+id/item_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.6"
            android:ellipsize="end"
            android:maxLines="1"
            android:paddingLeft="17dp"
            android:scrollHorizontally="true"
            android:singleLine="false"
            android:textSize="18dp"
            android:textStyle="bold"
            android:typeface="serif" >

        </TextView>            

        <TextView
            android:id="@+id/item_distance"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:ellipsize="end"
            android:maxLines="1"
            android:scrollHorizontally="true"
            android:singleLine="false"
            android:textColor="#3b5688"
            android:textSize="18dp"
            android:textStyle="bold"
            android:typeface="serif" >

        </TextView>            



        <ImageView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.1"
            android:contentDescription="@string/hello_world"
            android:src="@drawable/naprej" />


    </TableRow>


    </TableLayout>
   LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   v = vi.inflate(R.layout.list, null);