1

I have a simple app that you enter text into the textview and press submit and it shows the text in another Activity. However, when I press submit, gives me the message "Unfortunently Send Has Stopped" I looked at other threads on SO, but Unfortunately myfirstproject stopped working error in java seems the closest and they said to check the LogCat File, and it came up with more than one error:

07-11 19:38:01.925: E/Trace(729): error opening trace file: No such file or directory (2)
07-11 19:38:05.815: I/Choreographer(729): Skipped 451 frames!  The application may be doing too much work on its main thread.
07-11 19:38:06.009: D/gralloc_goldfish(729): Emulator without GPU emulation detected.
07-11 19:38:35.046: I/Choreographer(729): Skipped 45 frames!  The application may be doing too much work on its main thread.
07-11 19:38:41.427: D/AndroidRuntime(729): Shutting down VM
07-11 19:38:41.435: W/dalvikvm(729): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
07-11 19:38:41.585: E/AndroidRuntime(729): FATAL EXCEPTION: main
07-11 19:38:41.585: E/AndroidRuntime(729): java.lang.IllegalStateException: Could not execute method of the activity
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.view.View$1.onClick(View.java:3591)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.view.View.performClick(View.java:4084)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.view.View$PerformClick.run(View.java:16966)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.os.Handler.handleCallback(Handler.java:615)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.os.Handler.dispatchMessage(Handler.java:92)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.os.Looper.loop(Looper.java:137)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.ActivityThread.main(ActivityThread.java:4745)
07-11 19:38:41.585: E/AndroidRuntime(729):  at java.lang.reflect.Method.invokeNative(Native Method)
07-11 19:38:41.585: E/AndroidRuntime(729):  at java.lang.reflect.Method.invoke(Method.java:511)
07-11 19:38:41.585: E/AndroidRuntime(729):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-11 19:38:41.585: E/AndroidRuntime(729):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-11 19:38:41.585: E/AndroidRuntime(729):  at dalvik.system.NativeStart.main(Native Method)
07-11 19:38:41.585: E/AndroidRuntime(729): Caused by: java.lang.reflect.InvocationTargetException
07-11 19:38:41.585: E/AndroidRuntime(729):  at java.lang.reflect.Method.invokeNative(Native Method)
07-11 19:38:41.585: E/AndroidRuntime(729):  at java.lang.reflect.Method.invoke(Method.java:511)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.view.View$1.onClick(View.java:3586)
07-11 19:38:41.585: E/AndroidRuntime(729):  ... 11 more
07-11 19:38:41.585: E/AndroidRuntime(729): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.point/com.point.DisplayMessageActivity}; have you declared this activity in your AndroidManifest.xml?
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Activity.startActivityForResult(Activity.java:3351)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Activity.startActivityForResult(Activity.java:3312)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Activity.startActivity(Activity.java:3522)
07-11 19:38:41.585: E/AndroidRuntime(729):  at android.app.Activity.startActivity(Activity.java:3490)
07-11 19:38:41.585: E/AndroidRuntime(729):  at com.point.MainActivity.sendMessage(MainActivity.java:34)
07-11 19:38:41.585: E/AndroidRuntime(729):  ... 14 more
07-11 19:43:41.995: I/Process(729): Sending signal. PID: 729 SIG: 9

The link on SO also said something about not creating the TextView and it being NULL.

Can someone help me?

Community
  • 1
  • 1
Chris Okyen
  • 529
  • 2
  • 6
  • 22

3 Answers3

7

If you take a better look at the error log you'll see:

Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.point/com.point.DisplayMessageActivity}; have you declared this activity in your AndroidManifest.xml?

So, is your DisplayMessageActivity declared in the AndroidManifest.xml file?

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
Mokkun
  • 1,796
  • 1
  • 23
  • 32
  • How do I spot out that that is the problem of all the errors given? – Chris Okyen Jul 11 '12 at 21:05
  • The first causes all other errors, as you can see, first the ActivityNotFoundException is thrown, then a InvocationTargetException error is thrown, because it tried to call a Activity that doesn't exists, and so on... – Mokkun Jul 11 '12 at 21:08
  • 1
    It's a stack trace, so thinking in the context of the word "stack", start from the bottom up, and find the first exception. In this case it spells the problem out for you, but if it doesn't, then from the first exception, look down into the stack for the first line that references one of YOUR code files (e.g. com.point.MainActivity) and look at what line it's referencing (MainActivity.java:34). Your error will have been thrown from that line of code. – Kevin Coppock Jul 11 '12 at 21:10
4

Add this to your manifest file under Application Tag:

<activity android:name=".DisplayMessageActivity"></activity>
Hesham Saeed
  • 5,358
  • 7
  • 37
  • 57
1

From your stack trace:

Unable to find explicit activity class {com.point/com.point.DisplayMessageActivity}; 
have you declared this activity in your AndroidManifest.xml?

Have you?

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274