Runtimeexception With Android Optionsmenu
My application was running fine until i added the following code to add an options Menu to my main Activity: @Override public boolean onCreateOptionsMenu(Menu menu) { Menu
Solution 1:
Does the id searchbutton
exist in main.xml?
You would get back a null pointer if the id couldn't be found in your layout. The compiler won't catch this if the id exists in another layout file.
Post a Comment for "Runtimeexception With Android Optionsmenu"