How to set an imageView's image from a string?
if you have the image in the drawable folder you are going about this the wrong way.
try something like this
Resources res = getResources();
String mDrawableName = "logo_default";
int resID = res.getIdentifier(mDrawableName , "drawable", getPackageName());
Drawable drawable = res.getDrawable(resID );
icon.setImageDrawable(drawable );
No need to use getDrawable() you directly use the resource id like
String mDrawableName = "myimageName";
int resID = res.getIdentifier(mDrawableName , "drawable", getPackageName());
imgView.setImageResource(resID);