My Live wall app force closes when clicked on the Settings button.
wall_setting.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:key="time_interval"
android:title="@string/app_name"
android:summary="something"
android:defaultValue="3000"
android:entries="@array/updateInterval"
android:entryValues="@array/updateIntervalValues"
/>
</PreferenceScreen>
main.xml
<?xml version="1.0" encoding="utf-8"?>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="@drawable/ic_launcher"
android:settingsActivity="com.zacharia.lunar.WallService"
android:description="@string/wall_desc" />
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zacharia.lunar"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-feature
android:name="android.software.live_wallpaper"
android:required="true"></uses-feature>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<service
android:name="com.zacharia.lunar.WallService"
android:enabled="true"
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/main"></meta-data>
</service>
<activity
android:name="com.zacharia.lunar.SettingActivity"
android:label="@string/title_activity_main"
android:theme="@android:style/Theme.Light.WallpaperSettings"
android:exported="true">
</activity>
</application>
</manifest>
Errors
09-14 20:36:53.491: E/AndroidRuntime(542): java.lang.IllegalStateException: Could not execute method of the activity 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.View$1.onClick(View.java:2031) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.View.performClick(View.java:2364) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.View.onTouchEvent(View.java:4179) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.widget.TextView.onTouchEvent(TextView.java:6541) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.View.dispatchTouchEvent(View.java:3709) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.wallpaper.livepicker.LiveWallpaperPreview.dispatchTouchEvent(LiveWallpaperPreview.java:199) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.os.Handler.dispatchMessage(Handler.java:99) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.os.Looper.loop(Looper.java:123) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.app.ActivityThread.main(ActivityThread.java:4363) 09-14 20:36:53.491: E/AndroidRuntime(542): at java.lang.reflect.Method.invokeNative(Native Method) 09-14 20:36:53.491: E/AndroidRuntime(542): at java.lang.reflect.Method.invoke(Method.java:521) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 09-14 20:36:53.491: E/AndroidRuntime(542): at dalvik.system.NativeStart.main(Native Method) 09-14 20:36:53.491: E/AndroidRuntime(542): Caused by: java.lang.reflect.InvocationTargetException 09-14 20:36:53.491: E/AndroidRuntime(542): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113) 09-14 20:36:53.491: E/AndroidRuntime(542): at java.lang.reflect.Method.invokeNative(Native Method) 09-14 20:36:53.491: E/AndroidRuntime(542): at java.lang.reflect.Method.invoke(Method.java:521) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.view.View$1.onClick(View.java:2026) 09-14 20:36:53.491: E/AndroidRuntime(542): ... 20 more 09-14 20:36:53.491: E/AndroidRuntime(542): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.zacharia.lunar/com.zacharia.lunar.WallService}; have you declared this activity in your AndroidManifest.xml? 09-14 20:36:53.491: E/AndroidRuntime(542): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.app.Activity.startActivityForResult(Activity.java:2749) 09-14 20:36:53.491: E/AndroidRuntime(542): at android.app.Activity.startActivity(Activity.java:2855) 09-14 20:36:53.491: E/AndroidRuntime(542): ... 24 more