SearchBar missing attribute error
Hello, when using com.google.android.material.search.SearchBar.
I get this error :
java.lang.IllegalArgumentException: com.google.android.material.search.SearchBar requires a value for the projet.ludipass:attr/colorOnSurfaceVariant attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant)..
i use
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.8.0-beta01'
and my theme extends Theme.Material3.Light.NoActionBar.
Thanks
Actually i was extending Theme.MaterialComponents.DayNight.DarkActionBar in values-night (which i was not aware was blocking) which caused this error.
I switch it to Material3