mishaha
mishaha

Reputation: 1

setSupportActionBar cannot be applied(android.widget.Toolbar) error

whati need to do? activity

error

toolbar

toolberinactivityxml

Upvotes: 0

Views: 25

Answers (1)

Swaminathan V
Swaminathan V

Reputation: 4781

It seems you have imported the wrong toolbar in the activity.

You used androidX.toolbar in xml and imported android.toolbar. Try to import the relevant toolbar in the activity or press ctrl+shift+O to optimize imports.

Upvotes: 1

Related Questions