android.view.InflateException: Binary XML file line #4: Error inflating class SwitchPreference
<p>I'm trying to read my app preferences and I get this error:</p>

<p>Settings activity:</p>

<pre><code>public class Settings extends PreferenceActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

        try
        {
            addPreferencesFromResource(R.xml.prefs);
        }
        catch (Exception ex)
        {
            Log.e("errorSettings", Log.getStackTraceString(ex));
        }
    }
}
</code></pre>

<p>Preferences XML File:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;

    &lt;PreferenceCategory android:title="General"&gt;
    &lt;SwitchPreference
        android:title="Downloader"
        android:defaultValue="true"
        android:key="useDownloader"
        android:summary="Enable to use" /&gt;
    &lt;/PreferenceCategory&gt;

&lt;/PreferenceScreen&gt;
</code></pre>

<p>and on the application manifest I set this:</p>

<pre><code>&lt;uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15" /&gt;
</code></pre>

<p>and the first error I get is:</p>

<pre><code>android.view.InflateException: Binary XML file line #4: Error inflating class SwitchPreference
</code></pre>

<p>Thanx upfront.</p>
