java – method does not override method in its superclass

java – method does not override method in its superclass

The class Fragment or any of its super classes seem not to have the method public void setTitle(CharSequence title) so you cant use the @Override annotation. You can remove that annotation and you should be fine.

The above answer is correct, but just adding, check the spelling of your override method. In the case below, I was getting the same error because OnPause() should be onPause with a lower o

@Override
protected  void OnPause(){      // OnPause should be onPause, get rids of the error
    super.onPause();
    mFirebaseAuth.removeAuthStateListener(mAuthStateListener);
}

java – method does not override method in its superclass

Leave a Reply

Your email address will not be published. Required fields are marked *