Listing 10.4 Updating view objects (CrimeFragment.java)


#1

Criminal intent has stopped message appears after i try and select a crime.
Anybody got any idea whats going wrong??

here is the output from Logcat
03-08 06:16:32.084: D/dalvikvm(1092): GC_FOR_ALLOC freed 180K, 8% free 3137K/3388K, paused 60ms, total 65ms
03-08 06:16:32.224: D/dalvikvm(1092): GC_FOR_ALLOC freed 5K, 7% free 3417K/3672K, paused 43ms, total 44ms
03-08 06:16:32.254: I/dalvikvm-heap(1092): Grow heap (frag case) to 4.479MB for 1127536-byte allocation
03-08 06:16:32.334: D/dalvikvm(1092): GC_FOR_ALLOC freed <1K, 6% free 4518K/4776K, paused 68ms, total 68ms
03-08 06:16:32.944: D/(1092): HostConnection::get() New Host Connection established 0xb8c35478, tid 1092
03-08 06:16:33.634: W/EGL_emulation(1092): eglSurfaceAttrib not implemented
03-08 06:16:33.714: D/OpenGLRenderer(1092): Enabling debug mode 0
03-08 06:16:34.294: I/Choreographer(1092): Skipped 95 frames! The application may be doing too much work on its main thread.
03-08 06:16:35.624: I/Choreographer(1092): Skipped 35 frames! The application may be doing too much work on its main thread.
03-08 06:16:41.854: D/AndroidRuntime(1092): Shutting down VM
03-08 06:16:41.854: W/dalvikvm(1092): threadid=1: thread exiting with uncaught exception (group=0xb1a85b90)
03-08 06:16:41.914: E/AndroidRuntime(1092): FATAL EXCEPTION: main
03-08 06:16:41.914: E/AndroidRuntime(1092): Process: com.bignerdranch.android.criminalintent, PID: 1092
03-08 06:16:41.914: E/AndroidRuntime(1092): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.bignerdranch.android.criminalintent/com.bignerdranch.android.criminalintent.CrimeActivity}; have you declared this activity in your AndroidManifest.xml?
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.app.Activity.startActivityForResult(Activity.java:3423)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.app.Activity.startActivityForResult(Activity.java:3384)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:848)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.support.v4.app.Fragment.startActivity(Fragment.java:878)
03-08 06:16:41.914: E/AndroidRuntime(1092): at com.bignerdranch.android.criminalintent.CrimeListFragment.onListItemClick(CrimeListFragment.java:36)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.widget.AdapterView.performItemClick(AdapterView.java:299)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2904)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.widget.AbsListView$3.run(AbsListView.java:3638)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.os.Handler.handleCallback(Handler.java:733)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.os.Handler.dispatchMessage(Handler.java:95)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.os.Looper.loop(Looper.java:137)
03-08 06:16:41.914: E/AndroidRuntime(1092): at android.app.ActivityThread.main(ActivityThread.java:4998)
03-08 06:16:41.914: E/AndroidRuntime(1092): at java.lang.reflect.Method.invokeNative(Native Method)
03-08 06:16:41.914: E/AndroidRuntime(1092): at java.lang.reflect.Method.invoke(Method.java:515)
03-08 06:16:41.914: E/AndroidRuntime(1092): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-08 06:16:41.914: E/AndroidRuntime(1092): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
03-08 06:16:41.914: E/AndroidRuntime(1092): at dalvik.system.NativeStart.main(Native Method)
03-08 06:16:47.654: I/Process(1092): Sending signal. PID: 1092 SIG: 9


#2

Perhaps you forgot to list the activity on your Manifest?

03-08 06:16:41.914: E/AndroidRuntime(1092): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.bignerdranch.android.criminalintent/com.bignerdranch.android.criminalintent.CrimeActivity}; have you declared this activity in your AndroidManifest.xml?