Error inflating class include in PreferenceActivity
===

>java.lang.RuntimeException: Unable to start activity ComponentInfo{org.emphie.fod/org.emphie.fod.preferences}: android.view.InflateException: Binary XML file line #7: Error inflating class include

I'm trying to include a switch preference in versions that support it, otherwise a check box preference. It's fair to say I haven't been able to find any docco whatsoever on includes, but the *examples* I have seen are all for layouts, not preferences.

It seems crazy to require all preference fragments to wholly defined for their appropriate API when only some elements require different definitions.

Screen:

    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:enabled="true" android:fragment="org.emphie.fod.preferences$prefFrag1" >
        <PreferenceCategory android:title="Preferences" >
            <include android:key = "@+id/send_sms" xml="@xml/pref_send_sms" />
        </PreferenceCategory>
    </PreferenceScreen>

Included preference:

    <?xml version="1.0" encoding="utf-8"?>
    <merge xmlns:android="http://schemas.android.com/apk/res/android" >
        <SwitchPreference
            android:defaultValue="true"
            android:disableDependentsState="false"
            android:key="@+id/send_SMS"
            android:summaryOff="Just generate insults"
            android:summaryOn="Actually send the wanker insults"
            android:switchTextOff="No"
            android:switchTextOn="Yes"
            android:title="Send SMS" />
    </merge>
Links to appropriate docco gratefully received, along with google-fu tips. Am I doing something fundamentally, syntactically or stupidly wrong?

