Why does this happen? I was trying to make an action bar or toolbar
Unknown method setSupportActionBar
Try extending AppCompatActivity instead of Activity.
setSupportActionBar(tol); ✓
setSupportActionBar(AppBarLayout); ×
The extending worked! Thank you!