Probably nothing to do with addPreferencesFromResource() being deprecated. Check that the settings.xml was actually called res/xml/settings.xml, if you gave it a different name or put it in a different folder then it cannot be resolved.

The next thing you need to check is that there are no errors in any of your xml or layout files as this will cause R.java to not be generated and so the R.xml.settings will not exist. Do a project clean and look in the build results to find the errors.

You don’t have to do anything, in fact you have to use the deprecated method unless you change your program to use Fragments.

Using Fragments will make your program not work on Android 2.x and earlier unless you also switch to use the Fragments inside the Android compatibility library. See:

http://developer.android.com/tools/extras/support-library.html

Fragments are a somewhat advanced topic. For a little program like Sudoku there’s no reason to use Fragments. You only need them if you want to display a different UI in different screen sizes (like tablets) and orientations. See: