I created a settings activity using eclipse. The setting activity creates two example categories automatically (in addition to the general settings): Notifications and Data & Sync. The problem is that I simply don’t know how to delete them without making my app crash:
I tried simply deleting this block (i converted it to a comment) but the app crashed:
// Add 'notifications' preferences, and a corresponding header.
fakeHeader = new PreferenceCategory(this);
fakeHeader.setTitle(R.string.pref_header_notifications);
getPreferenceScreen().addPreference(fakeHeader);
addPreferencesFromResource(R.xml.pref_notification);
I cannot start from a blank activity since this is my first app, so I would prefer to start from the example settings activity.
How can I delete the “notifications” preference so I only have the general settings and data & sync?
This is the content of the logcat when it crashes:

Hard to say from your small example. What does eclipse say when it crashes (switch to the DDMS or DEBUG view and have a look at the logcat output)
If you are just starting, I suggest you use the wizard to create a first application instead of changing an existing example.