I can not understand what is the error that I have, what I did wrong? I have followed the various tutorials on the internet for how to set up an image from drawable, because it does not work?
Drawable drawable = mContext.getResources().getDrawable(
mContext.getResources().getIdentifier(
sampleItem.get(position).getImage(), "drawable",
mContext.getPackageName()));
image.setImageDrawable(drawable);
Logcat:
W/ResourceType(29255): No package identifier when getting value for resource number 0x00000000
D/AndroidRuntime(29255): Shutting down VM
W/dalvikvm(29255): threadid=1: thread exiting with uncaught exception (group=0x4331c1a0)
E/AndroidRuntime(29255): FATAL EXCEPTION: main
E/AndroidRuntime(29255): Process: com.treffedin.navigationdrawerdemo, PID: 29255
E/AndroidRuntime(29255): android.content.res.Resources$NotFoundException: Resource ID