2011-05-31 25 views
0

雖然我在Manifest文件中註冊了Activity類,但我得到了ActivityNotFoundException。 你能不能幫我請...獲取ActivityNotFoundException

謝謝..

<application android:icon="@drawable/icon" android:label="@string/app_name"> 
    <activity android:name="Login" 
       android:label="@string/app_name"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity android:name=".Registration" android:label="Registration" 
    ></activity> 
    <activity android:name=".Dashboard" android:label="Dashboard" 
    ></activity> 
    <activity android:name="com.innominds.BillDetails" 
    ></activity> 
</application> 

此清單文件。

現在,我寫了BillDetails類

import android.os.Bundle; 
import android.support.v4.app.Fragment; 
import android.support.v4.app.FragmentActivity; 
import android.view.LayoutInflater; 
import android.view.View; 
import android.view.ViewGroup; 
import android.view.Window; 
import android.view.WindowManager; 

public class BillDetails extends FragmentActivity 
{ 

public void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     this.requestWindowFeature(Window.FEATURE_NO_TITLE); 
     getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 
     setContentView(R.layout.details_bill); 
} 

    public static class BillSearch extends Fragment 
    { 
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
     { 
      return inflater.inflate(R.layout.billsearch, container, false); 
     } 

     public void onActivityCreated(Bundle savedState) 
     { 
       super.onActivityCreated(savedState); 
     } 
    } 

    public static class DetailBill extends Fragment 
    { 
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
     { 
      return inflater.inflate(R.layout.billdetails, container, false); 
     } 

     public void onActivityCreated(Bundle savedState) 
     { 
       super.onActivityCreated(savedState); 
     } 
    } 
} 
+1

您將不得不發佈您的AndroidManifest和您用於調用活動的代碼.. – Haphazard 2011-05-31 13:41:44

+0

檢查拼寫錯誤。然後發佈您的代碼和清單。 – 2011-05-31 13:41:53

+0

沒有看你的代碼,即使yoda會拒絕幫助:),請給我們一些代碼,所以我們可以看看和幫助 – doNotCheckMyBlog 2011-05-31 13:42:28

回答

1
<activity android:name="yourPackage.YourActivity" /> 
+0

通過添加包名稱也,它不會來.. – 2011-05-31 14:05:34

+0

你可以添加什麼logcat錯誤plz? – Houcine 2011-05-31 14:16:05

+0

不需要..我解決它。謝謝.. – 2011-05-31 14:17:49

1

是您的活動在不同的包比應用程序包下面的代碼?如果是這樣,那麼在清單文件中輸入活動的完整軟件包名稱。

+0

在清單文件中,我這樣寫 - 2011-05-31 13:47:33

+0

但我的Bill Details類正在擴展FragmentActivity。這是得到異常的原因嗎? – 2011-05-31 13:49:12

+0

如果沒有向我們展示任何東西,我們真的無法辨別出什麼是錯的。 – DustinRiley 2011-05-31 13:56:43