问题描述:

I have done some updates to the code and went to run on my phone for testing when an error message pops up stating "unfortunately,Campfire Songbook has stopped working".

Below is the logcat menus if someone can tell me what the problem is would be great.

07-23 21:18:26.782 2787-2787/com.songbook.noo.sttrfsongbook

E/AndroidRuntime﹕ FATAL EXCEPTION: main

Process: com.songbook.noo.sttrfsongbook, PID: 2787

java.lang.NullPointerException: Attempt to invoke virtual method 'void

android.widget.SearchView.setSearchableInfo(android.app.SearchableInfo)'

on a null object reference

at com.songbook.noo.sttrfsongbook.MainActivity.onCreateOptionsMenu(MainActivity.java:39)

at android.app.Activity.onCreatePanelMenu(Activity.java:2820)

at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:277)

at android.support.v7.internal.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:84)

at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImplBase.java:251)

at android.support.v7.app.AppCompatDelegateImplV7.preparePanel(AppCompatDelegateImplV7.java:1089)

at android.support.v7.app.AppCompatDelegateImplV7.doInvalidatePanelMenu(AppCompatDelegateImplV7.java:1374)

at android.support.v7.app.AppCompatDelegateImplV7.access$100(AppCompatDelegateImplV7.java:89)

at android.support.v7.app.AppCompatDelegateImplV7$1.run(AppCompatDelegateImplV7.java:126)

at android.os.Handler.handleCallback(Handler.java:739)

at android.os.Handler.dispatchMessage(Handler.java:95)

at android.os.Looper.loop(Looper.java:211)

at android.app.ActivityThread.main(ActivityThread.java:5321)

at java.lang.reflect.Method.invoke(Native Method)

at java.lang.reflect.Method.invoke(Method.java:372)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)

相关阅读:
Top