Android - Activity Not Found Exception

I am using startActivity to call another Activity and I get the "Activity Not Found Exception". Here is my code:

  TextView textView = (TextView) itemClicked;
  String strText = textView.getText().toString();
  String key = "symptom";
  Intent mIntent = new Intent(symptomActivity.this, symptomRemedyActivity.class);
  Bundle mBundle = new Bundle();
  mBundle.putString(key, strText);
  mIntent.putExtras(mBundle);
  startActivity(mIntent);

Here is the Logcat output:

INFO/ActivityManager(59): Displayed activity com.android.homeopathy/.HomeopathyActivity: 5542 ms (total 39089 ms)
INFO/ARMAssembler(59): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x3283e0:0x3284ec] in 627000 ns
INFO/ActivityManager(59): Starting activity: Intent { cmp=com.android.homeopathy/.symptomActivity }
INFO/ActivityManager(59): Displayed activity com.android.homeopathy/.symptomActivity: 2706 ms (total 2706 ms)
INFO/ActivityManager(59): Starting activity: Intent { cmp=com.android.homeopathy/.symptomRemedyActivity (has extras) }

Here is the debug window output:

    Thread [<1> main] (Suspended (exception ActivityNotFoundException)) 
Instrumentation.checkStartActivityResult(int, Object) line: 1404    
Instrumentation.execStartActivity(Context, IBinder, IBinder, Activity, Intent, int) line: 1378  
symptomActivity(Activity).startActivityForResult(Intent, int) line: 2817    
symptomActivity(Activity).startActivity(Intent) line: 2923  
symptomActivity$1.onItemClick(AdapterView, View, int, long) line: 67    
ListView(AdapterView).performItemClick(View, int, long) line: 284   
ListView.performItemClick(View, int, long) line: 3382   
AbsListView$PerformClick.run() line: 1696   
ViewRoot(Handler).handleCallback(Message) line: 587 
ViewRoot(Handler).dispatchMessage(Message) line: 92 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4627    
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 868  
ZygoteInit.main(String[]) line: 626 
NativeStart.main(String[]) line: not available [native method]  

symptomRemedyActivity is another activity in my project. Is there something I need to do like importing symptomRemedyActivity so that startActivity can see symptomRemedyActivity, to remove this "Activity Not Found Exception"?

18
задан James Testa 20 August 2010 в 18:06
поделиться