Error inflating androidx.appcompat.widget.SearchView
Asked Answered
F

0

6

We are getting crash reports in play store about an inflate exception with the androidx.appcompat.widget.SearchView, in the OnCreateView method where we inflate the layout this way.

val binding = DataBindingUtil.inflate(inflater, R.layout.layout_class_groups, container, false)

The SearchView implementation in the xml is as follows.

   <androidx.appcompat.widget.SearchView
            android:id="@+id/classGroupsSearchView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:theme="@style/SearchViewStyle"
            app:iconifiedByDefault="false" />

I have used custom style for the SearchView as well.

<style name="SearchViewStyle" parent="Widget.AppCompat.Light.SearchView">
    <item name="android:textSize">16sp</item>
</style>

We are unable to replicate this crash while testing, so how do i fix it?

Ferretti answered 5/3, 2023 at 19:0 Comment(2)
I get this too, and it's only for a small number of our users. I can't replicate the issue either.Provenience
Also getting this error for mostly Transsion (Tecno and Infinix) devices. Still trying to figure out why it's happening.Uzial

© 2022 - 2024 — McMap. All rights reserved.