Android - Aktivität nicht gefunden Ausnahme

Ich benutze startActivity, um eine andere Aktivität aufzurufen, und erhalte die "Activity Not Found Exception". Hier ist mein 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);

Hier ist die Logcat-Ausgabe:

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) }

Hier ist die Ausgabe des Debug-Fensters:

    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 ist eine weitere Aktivität in meinem Projekt. Muss ich beispielsweise symptomRemedyActivity importieren, damit startActivity symptomRemedyActivity erkennt, um diese "Activity Not Found Exception" zu entfernen?

Antworten auf die Frage(26)

Ihre Antwort auf die Frage