Home > Net >  Objects.requireNonNull error in Android Studio
Objects.requireNonNull error in Android Studio

Time:03-24

The line of code crashes my app :-

Objects.requireNonNull(getSupportActionBar()).hide();

I don't know why, can anyone help me...?

CodePudding user response:

getSupportActionBar() returns null. And since you require it to be non-null, it crashes.

  • Related