01-22 11:34:09.272: W/dalvikvm(358): threadid=1: thread exiting with uncaught exception (group=0x40015560)
01-22 11:34:09.292: E/AndroidRuntime(358): FATAL EXCEPTION: main
01-22 11:34:09.292: E/AndroidRuntime(358): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.listfile/com.example.listfile.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.os.Handler.dispatchMessage(Handler.java:99)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.os.Looper.loop(Looper.java:123)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread.main(ActivityThread.java:3683)
01-22 11:34:09.292: E/AndroidRuntime(358): at java.lang.reflect.Method.invokeNative(Native Method)
01-22 11:34:09.292: E/AndroidRuntime(358): at java.lang.reflect.Method.invoke(Method.java:507)
01-22 11:34:09.292: E/AndroidRuntime(358): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-22 11:34:09.292: E/AndroidRuntime(358): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-22 11:34:09.292: E/AndroidRuntime(358): at dalvik.system.NativeStart.main(Native Method)
01-22 11:34:09.292: E/AndroidRuntime(358): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ListActivity.onContentChanged(ListActivity.java:243)
01-22 11:34:09.292: E/AndroidRuntime(358): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:210)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.Activity.setContentView(Activity.java:1657)
01-22 11:34:09.292: E/AndroidRuntime(358): at com.example.listfile.MainActivity.onCreate(MainActivity.java:33)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-22 11:34:09.292: E/AndroidRuntime(358): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-22 11:34:09.292: E/AndroidRuntime(358): ... 11 more
01-22 11:34:11.342: I/Process(358): Sending signal. PID: 358 SIG: 9
01-22 11:34:09.292: E/AndroidRuntime(358): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.listfile/com.example.listfile.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
private List <String> getSD()
{
List <String> it = new ArrayList <String>();
File f = new File ("/mnt/sdcard/picture");
File[] files = f.listFiles ();
for (int i = 0; i <files.length; i++)
{
File file = files[i];
Log.d("Count",file.getPath());
it.add (file.getPath());
}
return it;
}
Android Populate ListView ImageView get Image Resource from SD ...