Theme.AppCompat, setSupportActionBar(...) , getSupportActionBar() .
To bypass the warning, perform a null check or
assert getSupportActionBar() != null;
which throws an exception if the expression is not true. Both have their own capabilities.
source
share