As always, a NullPointerException is being thrown because you are using an variable which doesn't point to an object - it instead has a null value. In your case, we can find out where using the stack trace:
The problem is on line 41 of the MainActivity class, in the getID() method. Line 41 looks like this: id[i]=getResources().getIdentifier(str[i] , "drawable", getPackageName());. There are a couple of objects used on that line, but the system ones (the Resources and package name) can't be null. This leaves the id array and the str array. I am not sure if str can be null (I would have to read your datamanager class I think, but for id:
Yup, that can null because you assign it to null, and it will never be anything but null since you never assign any other value to it. Create an appropriate array and assign it to the id variable.
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
how do I do my own kindle-like thing - without amazon