I try to read the settings of my application and I get this error:
Settings Activity:
public class Settings extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) {
Preferences XML File:
<?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory android:title="General"> <SwitchPreference android:title="Downloader" android:defaultValue="true" android:key="useDownloader" android:summary="Enable to use" /> </PreferenceCategory> </PreferenceScreen>
and in the application manifest, I installed this:
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15" />
and the first error I get:
android.view.InflateException: Binary XML file line #4: Error inflating class SwitchPreference
Thanx upfront.
source share