Android开发--ListPreferance 运行报错:android.preference.ListPreference.findIndexOfValue(ListPreference.java:169)

  在Stack Overflow上找到的答案:http://stackoverflow.com/questions/4357094/exception-on-listpreferences

 “i fixed it... I kept on trying and at the end it turns out (or seems, at the very least) that I cannot use integer-array as the entryValues Source. I just changed that integer-array to a string-array and got it working.

If there's a way to use integer-array as the source for entryValues please comment. I would still like that, it just makes more sense TO ME.”

是由于 ListPreferance 的属性android:entryValues="@array/alarm_repeat_entryvalues",传入的array为integer-array,换成string-array就行了

你可能感兴趣的:(Preference)