Android アプリの設定画面に MultiSelectListPreference を表示しようとしています。
コードは次のとおりです。
<MultiSelectListPreference
android:title="@string/exclude_days_title"
android:entries="@array/exclude_day_list_preference"
android:entryValues="@array/exclude_day_value_list_preference"
/>
しかし、次のエラーが発生しています:
08-17 12:45:45.713: E/AndroidRuntime(19486): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xyz.testapp/com.xyz.testapp.MainActivity}: android.view.InflateException: Binary XML file line #51: Error inflating class MultiSelectListPreference
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1872)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.os.Handler.dispatchMessage(Handler.java:99)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.os.Looper.loop(Looper.java:150)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread.main(ActivityThread.java:4385)
08-17 12:45:45.713: E/AndroidRuntime(19486): at java.lang.reflect.Method.invokeNative(Native Method)
08-17 12:45:45.713: E/AndroidRuntime(19486): at java.lang.reflect.Method.invoke(Method.java:507)
08-17 12:45:45.713: E/AndroidRuntime(19486): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
08-17 12:45:45.713: E/AndroidRuntime(19486): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
08-17 12:45:45.713: E/AndroidRuntime(19486): at dalvik.system.NativeStart.main(Native Method)
08-17 12:45:45.713: E/AndroidRuntime(19486): Caused by: android.view.InflateException: Binary XML file line #51: Error inflating class MultiSelectListPreference
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:441)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.rInflate(GenericInflater.java:481)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.rInflate(GenericInflater.java:493)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.inflate(GenericInflater.java:326)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.inflate(GenericInflater.java:263)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:254)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:268)
08-17 12:45:45.713: E/AndroidRuntime(19486): at com.xyz.testapp.MainActivity.onCreate(MainActivity.java:22)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
08-17 12:45:45.713: E/AndroidRuntime(19486): ... 11 more
08-17 12:45:45.713: E/AndroidRuntime(19486): Caused by: java.lang.ClassNotFoundException: android.preference.MultiSelectListPreference in loader dalvik.system.PathClassLoader[/data/app/com.xyz.testapp-1.apk]
08-17 12:45:45.713: E/AndroidRuntime(19486): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
08-17 12:45:45.713: E/AndroidRuntime(19486): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
08-17 12:45:45.713: E/AndroidRuntime(19486): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.createItem(GenericInflater.java:375)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.onCreateItem(GenericInflater.java:417)
08-17 12:45:45.713: E/AndroidRuntime(19486): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:428)
08-17 12:45:45.713: E/AndroidRuntime(19486): ... 20 more
08-17 12:47:47.752: D/AndroidRuntime(19693): Shutting down VM
08-17 12:47:47.752: W/dalvikvm(19693): threadid=1: thread exiting with uncaught exception (group=0x4001d5a0)
08-17 12:47:47.772: E/AndroidRuntime(19693): FATAL EXCEPTION: main
08-17 12:47:47.772: E/AndroidRuntime(19693): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xyz.testapp/com.xyz.testapp.MainActivity}: android.view.InflateException: Binary XML file line #51: Error inflating class MultiSelectListPreference
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1872)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.os.Handler.dispatchMessage(Handler.java:99)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.os.Looper.loop(Looper.java:150)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread.main(ActivityThread.java:4385)
08-17 12:47:47.772: E/AndroidRuntime(19693): at java.lang.reflect.Method.invokeNative(Native Method)
08-17 12:47:47.772: E/AndroidRuntime(19693): at java.lang.reflect.Method.invoke(Method.java:507)
08-17 12:47:47.772: E/AndroidRuntime(19693): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
08-17 12:47:47.772: E/AndroidRuntime(19693): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
08-17 12:47:47.772: E/AndroidRuntime(19693): at dalvik.system.NativeStart.main(Native Method)
08-17 12:47:47.772: E/AndroidRuntime(19693): Caused by: android.view.InflateException: Binary XML file line #51: Error inflating class MultiSelectListPreference
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:441)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.rInflate(GenericInflater.java:481)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.rInflate(GenericInflater.java:493)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.inflate(GenericInflater.java:326)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.inflate(GenericInflater.java:263)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:254)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:268)
08-17 12:47:47.772: E/AndroidRuntime(19693): at com.xyz.testapp.MainActivity.onCreate(MainActivity.java:22)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
08-17 12:47:47.772: E/AndroidRuntime(19693): ... 11 more
08-17 12:47:47.772: E/AndroidRuntime(19693): Caused by: java.lang.ClassNotFoundException: android.preference.MultiSelectListPreference in loader dalvik.system.PathClassLoader[/data/app/com.xyz.testapp-2.apk]
08-17 12:47:47.772: E/AndroidRuntime(19693): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
08-17 12:47:47.772: E/AndroidRuntime(19693): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
08-17 12:47:47.772: E/AndroidRuntime(19693): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.createItem(GenericInflater.java:375)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.onCreateItem(GenericInflater.java:417)
08-17 12:47:47.772: E/AndroidRuntime(19693): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:428)
08-17 12:47:47.772: E/AndroidRuntime(19693): ... 20 more