0

I try to build a small extension for dash clock, and I want to be able to configure a couple of settings, but as I am doing it now, it doesnt work.

In a prefs.xml file I have a checkbox like so:

<PreferenceScreen  xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference
android:title="Zenbat"
android:defaultValue="true"
android:key="checkbox"
android:summary="blabla"/>
</PreferenceScreen>

and then I have an activity called SettingsActivity, like so:

    public class SettingsActivity extends PreferenceActivity {

@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.prefs);
    }
    }

I thought I should see already the preferences when I hit the settings button of the extension, but I get the following error:

Unable to instantiate activity ComponentInfo. ClassNotFoundException.

In the manifest I have the meta data and the call to the activity:

  <meta-data android:name="settingsActivity"
  android:value=".SettingsActivity" />

 <activity android:name=".SettingsActivity"
 android:label="@string/title_settings"
 android:exported="true" />

Must the preferences be implemented other way? Or what am I doing wrong? Thank you in advance!

Edit (logfile): 03-17 22:12:53.810: E/AndroidRuntime(9885): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.wortdestages/com.wortdestages.SettingsActivity}: java.lang.ClassNotFoundException: Didn't find class "com.wortdestages.SettingsActivity" on path: /data/app/com.wortdestages-2.apk

0 Answers0