Sunday, July 31, 2011

Re: [android-developers] Annoyingly-persistent error in live wallpaper + prefs code

Jim,

Your settings activity is called:

com.jdgapps.BouncingBuckies.LiveWallpaperSettings


And the error message is about being unable to find:

com.jdgapps.BouncingBuckies


Not quite the same thing is it?

I don't know where a Live Wallpaper settings activity is declared - is
it in the xml/wallpaper.xml meta-info file? If so, check the file to
make sure it has the correct settings activity name.

-- Kostya

31.07.2011 20:08, Jim Graham пишет:
> I am working on a live wallpaper using AndEngine, and am seeing an
> annoyingly-persistent problem; I'm hoping someone here can see what
> I, and one other dev with a good deal more experience than I have,
> are not seeing.
>
> Before I added some preferences, it worked fine...but because the
> touch event code and the accelerometer code isn't currently working
> in the AndEngine LWP extension, without some configurable options,
> it was rather limited.... Cool-looking, but limited.
>
> As soon as I started adding prefs, and since that time, it will run
> in the preview all day, as long as you don't try to access the
> preferences screen. Once you do, it immediately force-closes.
>
> If anyone can see what might be happening from the following, please
> point me in the right direction....
>
> Here's the LogCat output---nothing I've tried has significantly changed
> this (except for time of day, process ID numbers):
>
> --------------------------- CUT HERE ---------------------------
>
> WARN/dalvikvm(12753): threadid=1: thread exiting with uncaught exception (group=0x400208b0)
> ERROR/AndroidRuntime(12753): FATAL EXCEPTION: main
> ERROR/AndroidRuntime(12753): java.lang.IllegalStateException: Could not execute method of the activity
> ERROR/AndroidRuntime(12753): at android.view.View$1.onClick(View.java:2072)
> ERROR/AndroidRuntime(12753): at android.view.View.performClick(View.java:2408)
> ERROR/AndroidRuntime(12753): at android.view.View$PerformClick.run(View.java:8824)
> ERROR/AndroidRuntime(12753): at android.os.Handler.handleCallback(Handler.java:587)
> ERROR/AndroidRuntime(12753): at android.os.Handler.dispatchMessage(Handler.java:92)
> ERROR/AndroidRuntime(12753): at android.os.Looper.loop(Looper.java:143)
> ERROR/AndroidRuntime(12753): at android.app.ActivityThread.main(ActivityThread.java:4717)
> ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invokeNative(Native Method)
> ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invoke(Method.java:521)
> ERROR/AndroidRuntime(12753): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
> ERROR/AndroidRuntime(12753): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> ERROR/AndroidRuntime(12753): at dalvik.system.NativeStart.main(Native Method)
> ERROR/AndroidRuntime(12753): Caused by: java.lang.reflect.InvocationTargetException
> ERROR/AndroidRuntime(12753): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
> ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invokeNative(Native Method)
> ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invoke(Method.java:521)
> ERROR/AndroidRuntime(12753): at android.view.View$1.onClick(View.java:2067)
> ERROR/AndroidRuntime(12753): ... 11 more
> ERROR/AndroidRuntime(12753): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.jdgapps.BouncingBuckies/com.jdgapps.BouncingBuckies}; have you declared this activity in your AndroidManifest.xml?
> ERROR/AndroidRuntime(12753): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
> ERROR/AndroidRuntime(12753): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
> ERROR/AndroidRuntime(12753): at android.app.Activity.startActivityForResult(Activity.java:2847)
> ERROR/AndroidRuntime(12753): at android.app.Activity.startActivity(Activity.java:2953)
> ERROR/AndroidRuntime(12753): ... 15 more
>
>
> --------------------------- CUT HERE ---------------------------
>
> And since it's asking if I've defined all of this in the Manifest, here
> it is:
>
> --------------------------- CUT HERE ---------------------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
> package="com.jdgapps.BouncingBuckies"
> android:versionCode="1"
> android:versionName="1.0">
>
> <uses-sdk android:minSdkVersion="7" />
>
> <uses-feature android:name="android.software.live_wallpaper" />
>
> <application android:icon="@drawable/icon" android:label="@string/app_name">
> <!-- Live Wallpaper Service -->
> <service
> android:name="BouncingBuckies"
> android:enabled="true"
> android:icon="@drawable/icon"
> android:label="@string/app_name"
> android:permission="android.permission.BIND_WALLPAPER">
> <intent-filter>
> <action android:name="android.service.wallpaper.WallpaperService" />
> </intent-filter>
> <meta-data
> android:name="android.service.wallpaper"
> android:resource="@xml/wallpaper" />
> <uses-permission android:name="android.permission.SET_WALLPAPER" />
> </service>
>
> <!-- Live Wallpaper Settings Activity -->
>
> <activity android:name="com.jdgapps.BouncingBuckies.LiveWallpaperSettings" android:label="@string/app_name"
> android:theme="@android:style/Theme.Light.WallpaperSettings"
> android:exported="true">
> </activity>
> </application>
> </manifest>
>
> --------------------------- CUT HERE ---------------------------
>
> Does anyone see anything here that might be causing the force-close?
>
> Thanks,
> --jim
>
>

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment