Код: Выделить всё
implementation 'com.google.android.material:material:1.12.0'
Код: Выделить всё
Код: Выделить всё
Код: Выделить всё
Caused by: android.view.InflateException: Binary XML file line #80 in com.myapp.android.debug:layout/mtrl_search_view: Failed to resolve attribute at index 1: TypedValue{t=0x2/d=0x7f040346 a=-1}, theme={InheritanceMap=[id=0x7f1603bccom.myapp.android.debug:style/ThemeOverlay.Material3.Search], Themes=[com.myapp.android.debug:style/ThemeOverlay.Material3.Search, forced, com.myapp.android.debug:style/Theme.MyApp.NoActionBar, forced, com.myapp.android.debug:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 1: TypedValue{t=0x2/d=0x7f040346 a=-1}, theme={InheritanceMap=[id=0x7f1603bccom.myapp.android.debug:style/ThemeOverlay.Material3.Search], Themes=[com.myapp.android.debug:style/ThemeOverlay.Material3.Search, forced, com.myapp.android.debug:style/Theme.MyApp.NoActionBar, forced, com.myapp.android.debug:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
Код: Выделить всё
Поэтому я добавил этот блок в стиль:
Код: Выделить всё
@style/Widget.Material3.SearchBar
@style/Widget.Material3.SearchView
@style/Widget.Material3.SearchView.Prefix
72dp
@style/Widget.Material3.SearchView.Toolbar
Код: Выделить всё
Caused by: android.view.InflateException: Binary XML file line #118 in com.myapp.android.debug:layout/mtrl_search_view: Binary XML file line #118 in com.myapp.android.debug:layout/mtrl_search_view: Error inflating class
Caused by: android.view.InflateException: Binary XML file line #118 in com.myapp.android.debug:layout/mtrl_search_view: Error inflating class
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f040126 a=-1}, theme={InheritanceMap=[id=0x7f1603bccom.myapp.android.debug:style/ThemeOverlay.Material3.Search], Themes=[com.myapp.android.debug:style/ThemeOverlay.Material3.Search, forced, com.myapp.android.debug:style/Theme.MyApp.NoActionBar, forced, com.myapp.android.debug:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
Код: Выделить всё
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79024591/errors-in-style-theme-for-material3-components-in-legacy-app[/url]