-1

I'm developing my project in android. Its location based service. Here i try to combine three activity under single project. so i create three xml file in layout. And also include three activity in Manifest. But when i try to execute my project it show the application has stopped unexpectedly. please try again. I think this error is in R.java. But i don't know the exact error. Pls help me.

my logcat display like

05-14 00:00:34.096: W/dalvikvm(356): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
05-14 00:00:34.118: E/AndroidRuntime(356): Uncaught handler: thread main exiting due to uncaught exception
05-14 00:00:34.206: E/AndroidRuntime(356): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.google.apis/com.androd.speech.TtsActivity}: java.lang.ClassNotFoundException: com.androd.speech.TtsActivity in loader dalvik.system.PathClassLoader@44e84190
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.os.Looper.loop(Looper.java:123)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread.main(ActivityThread.java:4363)
05-14 00:00:34.206: E/AndroidRuntime(356):  at java.lang.reflect.Method.invokeNative(Native Method)
05-14 00:00:34.206: E/AndroidRuntime(356):  at java.lang.reflect.Method.invoke(Method.java:521)
05-14 00:00:34.206: E/AndroidRuntime(356):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-14 00:00:34.206: E/AndroidRuntime(356):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-14 00:00:34.206: E/AndroidRuntime(356):  at dalvik.system.NativeStart.main(Native Method)
05-14 00:00:34.206: E/AndroidRuntime(356): Caused by: java.lang.ClassNotFoundException: com.androd.speech.TtsActivity in loader dalvik.system.PathClassLoader@44e84190
05-14 00:00:34.206: E/AndroidRuntime(356):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
05-14 00:00:34.206: E/AndroidRuntime(356):  at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
05-14 00:00:34.206: E/AndroidRuntime(356):  at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-14 00:00:34.206: E/AndroidRuntime(356):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
05-14 00:00:34.206: E/AndroidRuntime(356):  ... 11 more
05-14 00:00:34.266: I/dalvikvm(356): threadid=7: reacting to signal 3
05-14 00:00:34.368: I/dalvikvm(356): Wrote stack trace to '/data/anr/traces.txt'
05-14 00:05:20.357: I/Process(356): Sending signal. PID: 356 SIG: 9
sathish
  • 59
  • 9

2 Answers2

0

Are you using Text To Speech? From the logcat it looks like you are. To use TTS you have to check that TTS is installed on the device first.

This answer shows how to check it is installed:

SpeechToText and running the ACTION_CHECK_TTS_DATA intent

Community
  • 1
  • 1
Tony
  • 2,335
  • 21
  • 25
  • @sthish In your Manifest.xml add the TtsActivity. – jayellos May 14 '12 at 02:30
  • yes, i'm using Text to Speech. First activity is Google map, Second is GPS location third is Text to Speech. I tried these each activity alone. It executed alone, but when i try to combine its show Application has stopped unexpectedly. – sathish May 14 '12 at 02:31
0

this is probably the same problem as here

Unable to Instantiate Service: ClassNotFoundException

just need to change you "lib" folder to "libs" due to a recent ADT update...

Community
  • 1
  • 1
BossOss
  • 66
  • 4