views:

770

answers:

3

So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions.

Here is my preference class :

package com.p.t.wallpapers.mywallpaper;

import com.p.t.wallpapers.mywallpaper.R;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;

public class MySettingsActivity extends PreferenceActivity
implements SharedPreferences.OnSharedPreferenceChangeListener {

@Override
protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    getPreferenceManager().setSharedPreferencesName(
            ParticleCandy.SHARED_PREFS_NAME);
    addPreferencesFromResource(R.xml.settings);
    getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(
            this);
}

@Override
protected void onResume() {
    super.onResume();
}

@Override
protected void onDestroy() {
    getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(
            this);
    super.onDestroy();
}

public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
        String key) {
}

}

And here is my manifest file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.p.t.wallpapers.mywallpaper"
  android:versionCode="1"
  android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<service 
 android:label="@string/app_name" 
 android:name=".MyWallpaper" 
 android:permission="android.permission.BIND_WALLPAPER" >
 <intent-filter>
  <action 
   android:name="android.service.wallpaper.WallpaperService">
  </action>
</intent-filter>
<meta-data 
    android:name="android.service.wallpaper" 
    android:resource="@xml/wallpaper_info" />  
</service>

<activity
  android:label="@string/settings_title"
    android:name=".MySettingsActivity"
    android:theme="@android:style/Theme.Light.WallpaperSettings"
   android:exported="true">
</activity>

</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
</manifest> 

Any ideas why my preferences activity doesn't get read in from the manifest? The wallpaper service, MyWallpaper shows up just fine, but DDMS keeps telling me the activity MySettingsActivity doesn't exit.

Here is output from logcat

04-11 00:22:19.617: INFO/ActivityManager(57): Starting activity: Intent { cmp=com.android.wallpaper.livepicker/.LiveWallpaperPreview (has extras) }
04-11 00:22:21.796: INFO/ActivityManager(57): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperPreview: 2111 ms (total 2111 ms)
04-11 00:22:25.667: DEBUG/dalvikvm(375): GC freed 4745 objects / 316576 bytes in 192ms
04-11 00:22:25.727: INFO/ActivityManager(57): Starting activity: Intent { cmp=com.p.t.wallpapers.mywallpaper/MySettingsActivity (has extras) }
04-11 00:22:25.757: DEBUG/AndroidRuntime(375): Shutting down VM
04-11 00:22:25.768: WARN/dalvikvm(375): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-11 00:22:25.787: ERROR/AndroidRuntime(375): Uncaught handler: thread main exiting due to uncaught exception
04-11 00:22:25.847: ERROR/AndroidRuntime(375): java.lang.IllegalStateException: Could not execute method of the activity
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.View$1.onClick(View.java:2031)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.View.performClick(View.java:2364)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.View.onTouchEvent(View.java:4179)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.widget.TextView.onTouchEvent(TextView.java:6540)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.View.dispatchTouchEvent(View.java:3709)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.wallpaper.livepicker.LiveWallpaperPreview.dispatchTouchEvent(LiveWallpaperPreview.java:199)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.os.Looper.loop(Looper.java:123)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.app.ActivityThread.main(ActivityThread.java:4363)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invokeNative(Native Method)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invoke(Method.java:521)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at dalvik.system.NativeStart.main(Native Method)
04-11 00:22:25.847: ERROR/AndroidRuntime(375): Caused by: java.lang.reflect.InvocationTargetException
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invokeNative(Native Method)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invoke(Method.java:521)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.view.View$1.onClick(View.java:2026)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     ... 20 more
04-11 00:22:25.847: ERROR/AndroidRuntime(375): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.p.t.wallpapers.mywallpaper/MySettingsActivity}; have you declared this activity in your AndroidManifest.xml?
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.app.Activity.startActivityForResult(Activity.java:2749)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     at android.app.Activity.startActivity(Activity.java:2855)
04-11 00:22:25.847: ERROR/AndroidRuntime(375):     ... 24 more
04-11 00:22:25.917: INFO/Process(57): Sending signal. PID: 375 SIG: 3
04-11 00:22:25.917: INFO/dalvikvm(375): threadid=7: reacting to signal 3
04-11 00:22:25.988: ERROR/ActivityThread(57): Failed to find provider info for android.server.checkin
04-11 00:22:26.012: ERROR/Checkin(57): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
04-11 00:22:26.044: INFO/dalvikvm(375): Wrote stack trace to '/data/anr/traces.txt'
04-11 00:22:29.307: INFO/Process(375): Sending signal. PID: 375 SIG: 9
04-11 00:22:29.516: INFO/ActivityManager(57): Process android.process.acore (pid 375) has died.
04-11 00:22:29.516: INFO/WindowManager(57): WIN DEATH: Window{44dd50d8 Media:com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperPreview paused=false}
04-11 00:22:29.576: INFO/WindowManager(57): WIN DEATH: Window{44d660f8 com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperListActivity paused=false}
04-11 00:22:29.586: INFO/WindowManager(57): WIN DEATH: Window{44dbe2f0 com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperPreview paused=false}
04-11 00:22:29.876: INFO/ActivityManager(57): Start proc android.process.acore for activity com.android.wallpaper.livepicker/.LiveWallpaperListActivity: pid=421 uid=10022 gids={}
04-11 00:22:30.687: DEBUG/ddm-heap(421): Got feature list request
04-11 00:22:30.957: INFO/UsageStats(57): Unexpected resume of com.android.wallpaper.livepicker while already resumed in com.android.wallpaper.livepicker
04-11 00:22:31.756: WARN/ResourceType(421): getEntry failing because entryIndex 2 is beyond type entryCount 2
04-11 00:22:31.768: WARN/ResourceType(421): Failure getting entry for 0x7f040002 (t=3 e=2) in package 0: 0x80000001
04-11 00:22:32.758: WARN/InputManagerService(57): Got RemoteException sending setActive(false) notification to pid 375 uid 10022
04-11 00:22:33.137: INFO/ActivityManager(57): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperListActivity: 3430 ms (total 3430 ms)
04-11 00:22:33.528: ERROR/gralloc(57): [unregister] handle 0x467ae8 still locked (state=40000001)
04-11 00:22:38.368: DEBUG/dalvikvm(364): GC freed 611 objects / 51656 bytes in 179ms

Updated logcat

04-11 01:10:52.976: INFO/ActivityManager(57): Starting activity: Intent { act=android.intent.action.CHOOSER cmp=android/com.android.internal.app.ChooserActivity (has extras) }
04-11 01:10:53.668: WARN/InputManagerService(57): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44db02f8
04-11 01:10:54.587: INFO/ActivityManager(57): Displayed activity android/com.android.internal.app.ChooserActivity: 1140 ms (total 17760 ms)
04-11 01:10:56.458: INFO/ActivityManager(57): Starting activity: Intent { act=android.intent.action.SET_WALLPAPER flg=0x3000000 cmp=com.android.wallpaper.livepicker/.LiveWallpaperListActivity }
04-11 01:10:57.466: DEBUG/dalvikvm(1622): GC freed 1487 objects / 106648 bytes in 167ms
04-11 01:10:57.556: WARN/ResourceType(1622): getEntry failing because entryIndex 2 is beyond type entryCount 2
04-11 01:10:57.587: WARN/ResourceType(1622): Failure getting entry for 0x7f040002 (t=3 e=2) in package 0: 0x80000001
04-11 01:10:58.516: INFO/ActivityManager(57): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperListActivity: 1625 ms (total 1625 ms)
04-11 01:11:00.717: INFO/ActivityManager(57): Starting activity: Intent { cmp=com.android.wallpaper.livepicker/.LiveWallpaperPreview (has extras) }
04-11 01:11:02.948: INFO/ActivityManager(57): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperPreview: 2187 ms (total 2187 ms)
04-11 01:11:11.538: INFO/ActivityManager(57): Starting activity: Intent { cmp=com.p.t.wallpapers.mywallpaper/MySettingsActivity (has extras) }
04-11 01:11:11.577: DEBUG/AndroidRuntime(1622): Shutting down VM
04-11 01:11:11.587: WARN/dalvikvm(1622): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-11 01:11:11.597: ERROR/AndroidRuntime(1622): Uncaught handler: thread main exiting due to uncaught exception
04-11 01:11:11.667: ERROR/AndroidRuntime(1622): java.lang.IllegalStateException: Could not execute method of the activity
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.View$1.onClick(View.java:2031)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.View.performClick(View.java:2364)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.View.onTouchEvent(View.java:4179)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.widget.TextView.onTouchEvent(TextView.java:6540)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.View.dispatchTouchEvent(View.java:3709)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.wallpaper.livepicker.LiveWallpaperPreview.dispatchTouchEvent(LiveWallpaperPreview.java:199)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.os.Looper.loop(Looper.java:123)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.app.ActivityThread.main(ActivityThread.java:4363)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at java.lang.reflect.Method.invokeNative(Native Method)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at java.lang.reflect.Method.invoke(Method.java:521)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at dalvik.system.NativeStart.main(Native Method)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622): Caused by: java.lang.reflect.InvocationTargetException
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at java.lang.reflect.Method.invokeNative(Native Method)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at java.lang.reflect.Method.invoke(Method.java:521)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.view.View$1.onClick(View.java:2026)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     ... 20 more
04-11 01:11:11.667: ERROR/AndroidRuntime(1622): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.p.t.wallpapers.mywallpaper/MySettingsActivity}; have you declared this activity in your AndroidManifest.xml?
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.app.Activity.startActivityForResult(Activity.java:2749)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     at android.app.Activity.startActivity(Activity.java:2855)
04-11 01:11:11.667: ERROR/AndroidRuntime(1622):     ... 24 more
04-11 01:11:11.748: INFO/Process(57): Sending signal. PID: 1622 SIG: 3
04-11 01:11:11.748: INFO/dalvikvm(1622): threadid=7: reacting to signal 3
04-11 01:11:11.827: INFO/dalvikvm(1622): Wrote stack trace to '/data/anr/traces.txt'
04-11 01:11:11.858: ERROR/ActivityThread(57): Failed to find provider info for android.server.checkin
04-11 01:11:11.877: ERROR/Checkin(57): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
04-11 01:11:13.788: DEBUG/dalvikvm(101): GC freed 3389 objects / 203632 bytes in 2805ms
04-11 01:11:16.787: INFO/Process(1622): Sending signal. PID: 1622 SIG: 9
04-11 01:11:17.037: INFO/ActivityManager(57): Process android.process.acore (pid 1622) has died.
04-11 01:11:17.046: INFO/WindowManager(57): WIN DEATH: Window{44db47b0 Media:com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperPreview paused=false}
04-11 01:11:17.107: INFO/WindowManager(57): WIN DEATH: Window{44db7138 com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperListActivity paused=false}
04-11 01:11:17.208: INFO/WindowManager(57): WIN DEATH: Window{44da6860 com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperPreview paused=false}
04-11 01:11:17.426: INFO/ActivityManager(57): Start proc android.process.acore for activity com.android.wallpaper.livepicker/.LiveWallpaperListActivity: pid=1647 uid=10022 gids={}
04-11 01:11:18.266: DEBUG/dalvikvm(30): GC freed 222 objects / 8512 bytes in 799ms
04-11 01:11:18.577: DEBUG/ddm-heap(1647): Got feature list request
04-11 01:11:18.686: DEBUG/dalvikvm(30): GC freed 2 objects / 56 bytes in 406ms
04-11 01:11:19.037: INFO/UsageStats(57): Unexpected resume of com.android.wallpaper.livepicker while already resumed in com.android.wallpaper.livepicker
04-11 01:11:19.367: DEBUG/dalvikvm(30): GC freed 2 objects / 56 bytes in 652ms
04-11 01:11:19.827: WARN/ResourceType(1647): getEntry failing because entryIndex 2 is beyond type entryCount 2
04-11 01:11:19.837: WARN/ResourceType(1647): Failure getting entry for 0x7f040002 (t=3 e=2) in package 0: 0x80000001
04-11 01:11:20.378: WARN/InputManagerService(57): Got RemoteException sending setActive(false) notification to pid 1622 uid 10022
04-11 01:11:20.737: INFO/ActivityManager(57): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperListActivity: 3496 ms (total 3496 ms)
04-11 01:11:21.117: ERROR/gralloc(57): [unregister] handle 0x448168 still locked (state=40000001)
04-11 01:23:24.496: DEBUG/dalvikvm(98): GC freed 12398 objects / 575024 bytes in 213ms
A: 

Make sure your MySettingsActivity is in the com.p.t.wallpapers.mywallpaper package, otherwise you have to specify the absolute package name.

synic
It is. That's the weird thing, both the service and activity are in the same package, and the service shows up just fine when I run the emulator. The activity doesn't though.
Charlie
A: 

I would add a leading dot on your android:name attributes (e.g., android:name=".MySettingsActivity") or fully-qualify their package (e.g., android:name="com.p.t.wallpapers.mywallpaper.MySettingsActivity").

Also, I would get rid of the import com.p.t.wallpapers.mywallpaper.R, as it should not be needed (you're already in that package) and might be masking a package problem.

If neither of those help, please update your question to explain where, exactly, you are getting the ActivityNotFoundExceptions.

CommonsWare
I tried adding a leading . and using the full package name, as well as getting rid of the redundant import, still no luck. I've edited the question to include the error from logcat (or, at least a part of the error...can't put all of the error message up because it doesn't seem to format properly). Could this be caused by a malformed preference xml file? Other than the manifest file being wrong, that is the only thing I can think of that would throw off starting up the activity.
Charlie
Your logcat does not appear in the question. An ActivityNotFoundException will not be caused by a malformed `preferences.xml` file. The exception is not that it can't start the activity, but it can't *find* the activity. Your bug is probably where you call `startActivity()` to start the activity. Also, I'm dubious about the `android:exported="true"` declaration on your activity, as I would not expect that to be needed.
CommonsWare
Hi, I updated the question to include the output in logcat from the time I push to the emulator and to to the time I Force Close. I'm rather new to Android and Eclipse dev, so I'm trying to debug at the same time I'm trying to learn Android, so I really appreciate your responses. Is there anything you see in the logcat output that stands out?
Charlie
Well, to me, it looks like what I originally wrote -- you need `android:name=".MySettingsActivity"` in the manifest. Please make that change, then post a fresh logcat if that does not clear up the problem.
CommonsWare
I added another logcat output, this one from having ".MySettingsActivity" in the manifest file. Does it matter where in the manifest I declare my activity? Maybe I should put the activity before the service tag. Or maybe my activity tag needs an intent filter, even though it's a PreferenceActivity?
Charlie
OK, the new logcat confirms a theory, two comments of mine ago, that the problem is on the sending side. You haven't showed where you call `startActivity()`. What that should look like is `startActivity(new Intent(ctxt, MySettingsActivity.class))`, where `ctxt` is a `Context` (perhaps your `MyWallpaper` service). If that's not what you're doing, try that and see if it helps.
CommonsWare
I'm basing this off of the Cube live wallpaper example, and I was under the assumption I didn't need to programmaticaly call startActivity? The preference xml file is read in then Android takes care of instantiating the PreferenceActivity and starting it? I don't see a call to startActivity anywhere in the Cube live wallpaper source code.
Charlie
Thanks CommonWare, but I finally figured it out! Posted an answer reply with the solution for future posterity.
Charlie
+1  A: 

Figured it out. It was the wallpaper xml that is referenced in the manifest, under the meta data tag in the service tag. Basically, that xml has

<wallpaper 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:settingsActivity="MySettingsActivity"/>

Notice the "MySettingsActivity" there? Yeah, since this is a separate file from the manifest, it doesn't automatically have a package it starts searching class names from. So all I had to do was put the full package path, like so

<wallpaper 
xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.p.t.wallpapers.mywallpaper.MySettingsActivity" />

and voila! My preference screen pops up now when I hit the Settings... button, instead of force crashing. Oh man, facepalm!

Charlie