Android 1.5特定错误

问题描述:

我在使应用程序在android 1.5上运行时遇到问题。它工作正常在1.6,2.1和2.2,但每当我试图在1.5上运行它,我亲近与logcat的输出立即力:Android 1.5特定错误

java.lang.RuntimeException: Unable to start activity 
ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.BookmarkHistoryTabActivity}: 
android.view.InflateException: Binary XML file line #2: Error inflating class 
java.lang.reflect.Constructor 

这令我非常奇怪,因为线#2我的布局XML只是

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 

任何想法?在缺少布局XML的方式中,1.5和1.6之间是否有一些主要的API更改? (以下附上我的布局XML的参考其余部分)

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <include android:id="@+id/custom_titlebar" layout="@layout/custom_titlebar" /> 
    <ViewFlipper android:id="@+id/frame_content" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" > 
     <ListView android:id="@+id/soccerteams_listview" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:background="#FFFFFFFF"/> 
     <ListView android:id="@+id/countries_listview" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:background="#FFFFFFFF"/> 
    </ViewFlipper> 
    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:gravity="center_horizontal" 
     android:background="@android:color/black" 
     android:padding="0px"> 
     <Button android:id="@+id/bookmarks_button" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="@string/bookmarks" 
      android:textColor="@android:color/primary_text_dark" 
      android:drawableTop="@drawable/ic_bookmark_tab" 
      android:background="@drawable/tab_background" 
      android:layout_weight="1"/> 
     <Button android:id="@+id/history_button" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="@string/history" 
      android:textColor="@android:color/primary_text_dark" 
      android:drawableTop="@drawable/ic_history_tab" 
      android:background="@drawable/tab_background" 
      android:layout_weight="1"/> 
    </LinearLayout> 
</LinearLayout> 
+0

我认为这个问题必须在include ,然后发布布局=),但正如Romain所说的发布堆栈跟踪:) – Jorgesys 2010-07-15 23:28:14

+0

请发布完整的堆栈跟踪。 – 2010-07-15 22:45:05

请确保您有需要的人可绘制在“绘制”目录。 1.5不懂“drawable-hdpi”目录等,只知道“drawable”。

+0

谢谢 - 经过一番努力后我自己想出来了,但那是问题所在。 – QRohlf 2010-07-16 01:03:56