2013-10-28 64 views
0

我试图在android上实现TabHost几天,我被困在一个错误。我删除了我的核心tabhost代码,我仍然有同样的错误。我认为这是我的manifest.xml。根据我的错误信息,我查找了源清单,但找不到它。如何解决Android中的ClassNotFoundException

错误

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> 

回答

0

转到您的

项目属性> Java构建路径>订单和出口>

确保com.google.android.maps.jar被选中。

然后清理并重建您的项目。

+0

我试过了..maps.jar文件没有被点击。 – user1979727

+0

所以我遵循你的解决方案。仍然有同样的问题....我应该给你manifest.xml? – user1979727

+0

不,这不是清单的问题。确保Android私人图书馆被点击。并且您正在使用的任何外部jar都在Order和Export中单击。 – nedaRM

相关问题