Search app shows a blank screen



I’m an iPhone user/developer trying to learn Android. The sample app for chapter 28 presents me a blank screen on my new HTC One running Kitkat. I get the same behavior in the emulator. I also expected that the return key would initiate search, but since nothing happens, I’m not sure I’m guessing correctly about how the search UI is supposed to function.


Same here. Also after implementing SearchView my app crashes with a NullPointerException. This line causes the problem:



Fixed everything:


instead of



Yes, app:actionViewClass instead of android:actionViewClass fixed that null pointer exception for me too.

Don’t forget to define the app namespace on the menu element as xmlns:app=“”. (keep the android namespace also obviously)


I had the same problem. I realized that the solution code had

in, so I needed to put my API key in. Another important thing to note is that also has

which needs to be updated to

with https. After I made these changes it worked! :slight_smile: