Cant create preferences activity in Android


New Member
I am trying to make a preferences activity in android. What happens is you start the app and the you press the menu or settings button on your phone while in the app. Preferences should be on of the categories you can chose from. the problem is when I tap preferences the application crashes. Can someon please fix and repaste my code.\[code\]import android.os.Bundle;import android.preference.PreferenceActivity;public class Prefs extends PreferenceActivity{@Overrideprotected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.prefs);}}\[/code\]I am aware I am using a deprecated method, I tried going to the android.developers website and I couldnt find an answerHere is my XML:\[code\]<EditTextPreference android:title="EditText" android:key="name" android:summary="Enter Your Name" /><CheckBoxPreference android:title="CheckBox" android:defaultValue="" android:key="checkbox" android:summary="check this box" /><ListPreference android:title="list" android:key="list" android:summary="This is a list to choose from" android:entries="@+array/list" android:entryValues="@+array/lvalues" ></ListPreference>\[/code\]