Attempt to refresh fragment gives me NullPointerException; I've made sure compatibility isn't an issue, and my fragments shouldn't be null
问题 I am currently trying to implement code in my android project where my fragments will refresh after a button is pressed, recreating the view and displaying different items. I made sure there were no compatibility issues between android.app and android.support.v4.app, and am positive that I have my fragments' id's labelled correctly. Here is the exact error I received when running my app on an emulator: java.lang.NullPointerException: Attempt to write to field 'int android.support.v4.app