안드로이드 환경설정 레이아웃중   SwitchPreference  사용에 관하여 질문드립니다.

 

스위치로(on/off)를 사용하여 레이아웃을 만들려 하는데 하는데 혹시 안드로이드 버전에 따라 사용이 제한 되나요?

 

<?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
        <CheckBoxPreference
            android:summary="text."
            android:title="text"
            android:key="keycheck"/>
        <ListPreference
            android:summary="text."
            android:title="text"
            android:key="keylist"
            android:entries="@array/set_list_desc"
            android:entryValues="@array/set_list_value"/>       
        <PreferenceCategory
            android:title="inline_preferences">
            <SwitchPreference
            android:summary="text"
            android:key="switch"
            android:switchTextOff="OFF"
            android:switchTextOn="ON"
            android:title="진동설정" android:defaultValue="1"/>

         </PreferenceCategory>

</PreferenceScreen>
 

 

<error>

대표적으로 다음과 같은 에러들이 발생합니다..

Error inflating class SwitchPreference

andorid.app.ActivityThread.performLaunchActivity

android.preference.GenericInflater.createItemFromTag

android.preference.GenericInflater.rInflate

android.preference.GenericInflater.onCreateItem

 

//Manifast

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />