How to set a PNG file to an ImageView?
you can also set the image using an xml file with the following attriblute
android:src="@drawable/nochart"
just put your .png file in mipmap folder
Use:
chartImageView.setImageResource(R.drawable.nochart);
I encountered the same problem. The solution for me was to move the ".png" from "drawable-21" to "drawable".