setTitle

open fun setTitle(title: CharSequence)

SearchBar does not support the setTitle method, or its corresponding xml attribute. Instead, use setHint or setText, or their corresponding xml attributes, to provide a text affordance for your SearchBar.