我已经尝试在 android 上实现 TabHost 几天了,但我遇到了一个错误。我删除了我的核心 tabhost 代码,我仍然有同样的错误。我认为这是我的 manifest.xml。根据我的错误消息,我查找了源清单,但找不到。
错误
E/AndroidRuntime(32386): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.FragmentLayout" on path: /system/framework/com.google.android.maps.jar:/data/app/com.sysdisc.mobile.hangmessage-1.apk
代码
public class AA extends FragmentActivity{
private ListView inboxList;
private ListView outboxList;
private ListView listView1;
private ListView listView2;
ProgressDialog dialog;
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState); 
    dialog = new ProgressDialog(this);
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    dialog.setMessage(getString(R.string.pleaseWait));
    dialog.setTitle(R.string.loading);
    setContentView(R.layout.message_history_entire_layout);
    }
}
这是我的xml
 <?xml version="1.0" encoding="utf-8"?>
<TabHost 
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabHost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:padding="5dp" >
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
        <FragmentLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="5dp">
           <ListView android:id="@+id/list1" android:layout_width="fill_parent"
          android:layout_height="wrap_content" android:layout_weight="1">
      </ListView>
        <ListView android:id="@+id/list2" android:layout_width="fill_parent"
                android:layout_height="wrap_content" android:layout_weight="1">
            </ListView>  
       </FragmentLayout>
    </LinearLayout>