我有一點麻煩。我在這方面是全新的。我試圖讓我的應用程序以啓動屏幕開始,然後繼續進行新的活動,但我的應用程序保持強制關閉的異常情況:main。這是logcat致命例外:主
02-12 02:56:32.989: D/AndroidRuntime(1487): Shutting down VM
02-12 02:56:32.989: W/dalvikvm(1487): threadid=1: thread exiting with uncaught exception (group=0x4001e560)
02-12 02:56:33.009: E/AndroidRuntime(1487): FATAL EXCEPTION: main
02-12 02:56:33.009: E/AndroidRuntime(1487): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.madonk.LAFEST/com.madonk.LAFEST.MAIN}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1702)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1722)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.access$1500(ActivityThread.java:124)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.os.Looper.loop(Looper.java:130)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.main(ActivityThread.java:3821)
02-12 02:56:33.009: E/AndroidRuntime(1487): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 02:56:33.009: E/AndroidRuntime(1487): at java.lang.reflect.Method.invoke(Method.java:507)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-12 02:56:33.009: E/AndroidRuntime(1487): at dalvik.system.NativeStart.main(Native Method)
02-12 02:56:33.009: E/AndroidRuntime(1487): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ListActivity.onContentChanged(ListActivity.java:243)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.Activity.setContentView(Activity.java:1716)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.madonk.LAFEST.MAIN.onCreate(MAIN.java:17)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1666)
02-12 02:56:33.009: E/AndroidRuntime(1487): ... 11 more
如果有什麼人可以做的幫助,我將不勝感激。
你能張貼您的來源?所有的控制檯告訴我,有一個ListView的問題 – Flynn 2012-02-12 08:10:01