Binary XML file line #0: Error inflating class ImageView

后端 未结 9 675
日久生厌
日久生厌 2020-11-30 07:29

I am using Android studio 3.0
I am getting tired fixing this problem. the app does not execute it always show me this error Binary XML file line #0: Error inflating clas

9条回答
  •  醉梦人生
    2020-11-30 08:19

    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.

提交回复
热议问题