0

これは私のLogCatにあり、それが何を意味するのかわかりません。誰かがこれを理解できますか。ありがとうございました!

12-26 17:51:04.141: W/dalvikvm(9109): threadid=1: thread exiting with uncaught exception (group=0x40af6300)
12-26 17:51:04.151: E/AndroidRuntime(9109): FATAL EXCEPTION: main
12-26 17:51:04.151: E/AndroidRuntime(9109): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.to_doliste/com.example.to_doliste.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2243)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2278)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread.access$600(ActivityThread.java:142)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.os.Looper.loop(Looper.java:156)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread.main(ActivityThread.java:5099)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at java.lang.reflect.Method.invokeNative(Native Method)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at java.lang.reflect.Method.invoke(Method.java:511)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at dalvik.system.NativeStart.main(Native Method)
12-26 17:51:04.151: E/AndroidRuntime(9109): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ListActivity.onContentChanged(ListActivity.java:250)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:281)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.Activity.setContentView(Activity.java:1897)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at com.example.to_doliste.MainActivity.onCreate(MainActivity.java:17)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.Activity.performCreate(Activity.java:4543)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
12-26 17:51:04.151: E/AndroidRuntime(9109):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
12-26 17:51:04.151: E/AndroidRuntime(9109):     ... 11 more
12-26 17:53:16.211: W/dalvikvm(10189): threadid=1: thread exiting with uncaught exception (group=0x40af6300)
12-26 17:53:16.221: E/AndroidRuntime(10189): FATAL EXCEPTION: main
12-26 17:53:16.221: E/AndroidRuntime(10189): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.to_doliste/com.example.to_doliste.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2243)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2278)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread.access$600(ActivityThread.java:142)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.os.Looper.loop(Looper.java:156)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread.main(ActivityThread.java:5099)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at java.lang.reflect.Method.invokeNative(Native Method)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at java.lang.reflect.Method.invoke(Method.java:511)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at dalvik.system.NativeStart.main(Native Method)
12-26 17:53:16.221: E/AndroidRuntime(10189): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ListActivity.onContentChanged(ListActivity.java:250)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:281)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.Activity.setContentView(Activity.java:1897)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at com.example.to_doliste.MainActivity.onCreate(MainActivity.java:17)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.Activity.performCreate(Activity.java:4543)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
12-26 17:53:16.221: E/AndroidRuntime(10189):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
12-26 17:53:16.221: E/AndroidRuntime(10189):    ... 11 more
12-26 17:56:31.941: W/dalvikvm(12002): threadid=1: thread exiting with uncaught exception (group=0x40af6300)
12-26 17:56:31.951: E/AndroidRuntime(12002): FATAL EXCEPTION: main
12-26 17:56:31.951: E/AndroidRuntime(12002): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.to_doliste/com.example.to_doliste.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2243)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2278)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread.access$600(ActivityThread.java:142)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.os.Looper.loop(Looper.java:156)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread.main(ActivityThread.java:5099)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at java.lang.reflect.Method.invokeNative(Native Method)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at java.lang.reflect.Method.invoke(Method.java:511)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at dalvik.system.NativeStart.main(Native Method)
12-26 17:56:31.951: E/AndroidRuntime(12002): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ListActivity.onContentChanged(ListActivity.java:250)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:281)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.Activity.setContentView(Activity.java:1897)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at com.example.to_doliste.MainActivity.onCreate(MainActivity.java:17)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.Activity.performCreate(Activity.java:4543)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
12-26 17:56:31.951: E/AndroidRuntime(12002):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
12-26 17:56:31.951: E/AndroidRuntime(12002):    ... 11 more
12-26 17:56:33.251: D/Process(12002): killProcess, pid=12002
12-26 17:56:33.251: D/Process(12002): dalvik.system.VMStack.getThreadStackTrace(Native Method)
12-26 17:56:33.251: D/Process(12002): java.lang.Thread.getStackTrace(Thread.java:599)
12-26 17:56:33.251: D/Process(12002): android.os.Process.killProcess(Process.java:813)
12-26 17:56:33.251: D/Process(12002): com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:104)
12-26 17:56:33.251: D/Process(12002): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
12-26 17:56:33.251: D/Process(12002): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
4

3 に答える 3

6

ここ

コンテンツには、id属性が「android.R.id.list」であるListViewが必要です。12-2617:51:04.151:E / AndroidRuntime(9109):at

これは、ListViewIDを次のようにxmlレイアウトにリストするように設定する必要があることを意味します。

<ListView android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
于 2012-12-26T17:04:30.633 に答える
2
17:56:31.951: E/AndroidRuntime(12002): 
    Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' 
12-26 17:56:31.951: E/AndroidRuntime(12002): at android.app.ListActivity.onContentChanged(ListActivity.java:250) 12-26 17:56:31.951: E/AndroidRuntime(12002): at 

listListViewを使用しようとしているようですが、にidを持つエントリがありませんxml

<ListView android:id="@android:id/list"
         ....../>
于 2012-12-26T17:05:04.433 に答える
1

通常、エラーメッセージで「原因」を探します。

Caused by: java.lang.RuntimeException: Your content 
must have a ListView whose id attribute is 'android.R.id.list'

カスタムリストビューのxmlレイアウトファイルに期待されるリストIDを指定して、それを見つけられるようにする必要があります。

android:id="@android:id/list"
于 2012-12-26T17:07:03.407 に答える