Binary XML file line #0: Error inflating class ImageView [duplicate] Binary XML file line #0: Error inflating class ImageView [duplicate] android android

Binary XML file line #0: Error inflating class ImageView [duplicate]


In Android Studio version 3.0.0 and above, once we try to add images to drawable folder, it will ask you to 'Choose Destination Directory'. At that time, choose drawable instead of drawable-v24.

<code>enter image description here</code>

Keep Coding........ :)


don't paste your image in drawable(v-24), paste it into the drawable folderand clean the project and then run it will work.


Some SVGs sources seem to not be fully supported. Add below line within your activity's onCreate() method:

AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);

and make sure you use below as attribute to your ImageView in your xml file:app:srcCompact instead of android:src to define your image.