If you are using new androidx implementations, when typing Toolbar, the Studio will autocomplete it to android.support.v7.widget.Toolbar
, but you should use androidx.appcompat.widget.Toolbar
instead, otherwise you will get this error.
If you are using new androidx implementations, when typing Toolbar, the Studio will autocomplete it to android.support.v7.widget.Toolbar
, but you should use androidx.appcompat.widget.Toolbar
instead, otherwise you will get this error.