0

I have a programm with a simple ListView and set an OnItemLongClickListener on it. All fine, Android Studio doesn't show any mistake. But when I longclick in the app, the app stopped and Android Studio showed a Runtime Error:

java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.ActionMode$Callback.onCreateActionMode (anddroid.view.ActionMode, android.view.Menu)' on a null object reference

What does ListView and OnItemLongClickListener have to do with ActionMode? And how can I fix it?

Samvel Aleqsanyan
  • 2,812
  • 4
  • 20
  • 28

0 Answers0