I found this tutorial about image view usage .
I changed the photoalbum from NAT to DCIM / Camera and it worked. This program loads the images from sd card. What I need is to load images from res drawable folder. I tried to change the directory from DCIM / Camera to res/drawable/myimage.jpg and of course it didn't work since this change is not a valid directory for this project. Can you please check the link I gave above and give me some advice on how to load images from drawable ?
And my 2nd question will be about loading these images from a url source.
Logcat Results ;
07-10 22:26:32.060: I/Process(25981): Sending signal. PID: 25981 SIG: 9
07-10 22:26:48.379: D/AndroidRuntime(26069): Shutting down VM
07-10 22:26:48.379: W/dalvikvm(26069): threadid=1: thread exiting with uncaught exception (group=0x41fecd40)
07-10 22:26:48.387: E/AndroidRuntime(26069): FATAL EXCEPTION: main
07-10 22:26:48.387: E/AndroidRuntime(26069): Process: info.androidhive.imageslider, PID: 26069
07-10 22:26:48.387: E/AndroidRuntime(26069): java.lang.RuntimeException: Unable to start activity ComponentInfo{info.androidhive.imageslider/info.androidhive.imageslider.GridViewActivity}: java.lang.NullPointerException
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread.access$800(ActivityThread.java:139)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.os.Handler.dispatchMessage(Handler.java:102)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.os.Looper.loop(Looper.java:136)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread.main(ActivityThread.java:5102)
07-10 22:26:48.387: E/AndroidRuntime(26069): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 22:26:48.387: E/AndroidRuntime(26069): at java.lang.reflect.Method.invoke(Method.java:515)
07-10 22:26:48.387: E/AndroidRuntime(26069): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
07-10 22:26:48.387: E/AndroidRuntime(26069): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
07-10 22:26:48.387: E/AndroidRuntime(26069): at dalvik.system.NativeStart.main(Native Method)
07-10 22:26:48.387: E/AndroidRuntime(26069): Caused by: java.lang.NullPointerException
07-10 22:26:48.387: E/AndroidRuntime(26069): at info.androidhive.imageslider.helper.Utils.getFilePaths(Utils.java:39)
07-10 22:26:48.387: E/AndroidRuntime(26069): at info.androidhive.imageslider.GridViewActivity.onCreate(GridViewActivity.java:36)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.Activity.performCreate(Activity.java:5248)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
07-10 22:26:48.387: E/AndroidRuntime(26069): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
07-10 22:26:48.387: E/AndroidRuntime(26069): ... 11 more
07-10 22:26:49.809: I/jdwp(26069): Ignoring second debugger -- accepting and dropping
07-10 22:26:50.072: I/jdwp(26069): Ignoring second debugger -- accepting and dropping
07-10 22:26:50.641: I/jdwp(26069): Ignoring second debugger -- accepting and dropping
07-10 22:26:50.944: I/jdwp(26069): Ignoring second debugger -- accepting and dropping