Android 1.5 でアプリケーションを機能させるのに問題があります。1.6、2.1、および 2.2 では正常に動作しますが、1.5 で実行しようとすると、LogCat 出力ですぐに強制終了されます。
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
私のレイアウト XML の 2 行目はちょうど
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
何か案は?1.5 と 1.6 の間で、レイアウト XML が行われる方法に欠けている大きな 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>