I have seen in the Firebase Crashlytics dashboard that there is an user that had crashes in some of the app's activities in the OnCreate() method. I have seen that it is an error of the xml as the error is this one and it is related with the ImageView component:
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #24: Binary XML file line #24: Error inflating class ImageView
I have seen that the layouts of the activities that are causing these crashes have in common that in the ImageView there is an attribute that is
android:scaleType="fitXY"
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:background="@drawable/img"
android:scaleType="fitXY" />
So my question is, could that scaleType="fitXY" be causing all these crashes? Is it bad behaviour to use scaleType attribute in ImageViews then?
Thanks for the possible help