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.
More Related Contents:
- Creating a SearchView that looks like the material design guidelines
- Toolbar navigation icon never set
- Material Design not styling alert dialogs
- How to implement the Material-design Elevation for Pre-lollipop
- How to change Toolbar Navigation and Overflow Menu icons (appcompat v7)?
- The application icon does not show on action bar
- How can I modify ripple color when using ?attr/selectableItemBackground as background?
- Android v21 Theme.Appcompat color accent is ignored, no padding on dialogs
- Is any difference between a MaterialButton and a simple Button?
- transparent Actionbar with AppCompat-v7 21
- Toolbar.inflateMenu seems to do nothing
- Android Material Design Datepicker with AppCompat
- How to create a card toolbar using appcompat v7
- How to use setOutlineProvider instead of setOutline in Lollipop
- How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?
- No resource found that matches the given name ‘@style/Theme.AppCompat.Light’
- Display badge on top of bottom navigation bar’s icon
- Why is my smallIcon for Notifications always greyed out?
- Android Material: Status bar color won’t change
- AppCompatActivity.onCreate can only be called from within the same library group
- Tab not taking full width on Tablet device [Using android.support.design.widget.TabLayout]
- Android Circular Determinate ProgressBar
- Add elevation/shadow on toolbar for pre-lollipop devices
- “You need to use a Theme.AppCompat theme (or descendant) with the design library” error
- The import android.support.v7.app cannot be resolved
- Status bar turns white and does not show content behind it
- How to set a ripple effect on textview or imageview on Android?
- CoordinatorLayout using the ViewPager’s RecyclerView
- Fixing Error in styles.xml to generate R.java : No resource found name ‘Theme.AppCompat.Light’
- Getting exception : java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14