Error inflating class android.support.v7.widget.Toolbar?

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.

Leave a Comment