Toast.makeText(getBaseContext(), "" + list.length, Toast.LENGTH_SHORT).show();
로그캣 메세지는 아래와 같습니다.
05-20 22:22:26.016 16677-16677/com.example.hyub.imc D/ResourcesManager﹕ creating new AssetManager and set to /data/app/com.example.hyub.imc-2/base.apk
05-20 22:22:26.076 16677-16677/com.example.hyub.imc V/BitmapFactory﹕ DecodeImagePath(decodeResourceStream3) : res/drawable/android_author.png
05-20 22:22:26.076 16677-16677/com.example.hyub.imc V/BitmapFactory﹕ DecodeImagePath(decodeResourceStream3) : res/drawable/ggg.png
05-20 22:22:26.106 16677-16677/com.example.hyub.imc V/BitmapFactory﹕ DecodeImagePath(decodeResourceStream3) : res/drawable/android_version.png
05-20 22:22:26.106 16677-16677/com.example.hyub.imc E/File﹕ fail readDirectory() errno=13
05-20 22:22:26.116 16677-16677/com.example.hyub.imc D/AndroidRuntime﹕ Shutting down VM
05-20 22:22:26.116 16677-16677/com.example.hyub.imc E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.hyub.imc, PID: 16677
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hyub.imc/com.example.hyub.imc.MainActivity}: java.lang.NullPointerException: Attempt to get length of null array
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at com.example.hyub.imc.MainActivity.onCreate(MainActivity.java:93)
at android.app.Activity.performCreate(Activity.java:6221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
05-20 22:22:29.696 16677-16677/com.example.hyub.imc I/Process﹕ Sending signal. PID: 16677 SIG: 9