Unable to instantiate LiveWallpaper
<p>I'm trying to make an animated LiveWallpaper however i keep getting a classnotfounderror. I don't know if it can't find the service or my service is not where it needs to be. Here's my manifest:</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.livewallpaper"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="15" /&gt;

&lt;uses-feature android:name="android.software.live_wallpaper" /&gt;

&lt;application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;service
        android:name="com.livewallpaper"
        android:enabled="true"
        android:label="@string/app_name"
        android:permission="android.permission.BIND_WALLPAPER" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.service.wallpaper.WallpaperService" /&gt;
        &lt;/intent-filter&gt;

        &lt;meta-data
            android:name="android.service.wallpaper"
            android:resource="@xml/livewallpaper" /&gt;
    &lt;/service&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>here is my engine:</p>

<pre><code>public class LiveWallpaper extends WallpaperService {

@Override
public Engine onCreateEngine() {
    return new LiveWallpaperEngine();
}

private class LiveWallpaperEngine extends Engine {
    private Handler _handler;
    private final Runnable Animation = new Runnable() {

        @Override
        public void run() {
            drawNextFrame();
        }

    };
    private Canvas _canvas;
    private boolean _visible;
    private ArrayList&lt;Bitmap&gt; _frameList;
    private float _xOffset;
    private float _yOffset;
    private int _currentFrame;
    private SurfaceHolder _surfaceHolder;

    public LiveWallpaperEngine() {

        _xOffset = (float) 0.0;
        _yOffset = (float) 0.0;
        _currentFrame = 0;
        _visible = true;
        _canvas = new Canvas();

        // Put the pictures in an ArrayList
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame1));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame2));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame3));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame4));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame5));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame6));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame7));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame8));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame9));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame10));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame11));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame12));
        _frameList.add(BitmapFactory.decodeResource(getResources(),
                R.drawable.frame13));

        _handler.post(Animation);

    }

    @Override
    public void onOffsetsChanged(float xOffset, float yOffset,
            float xOffsetStep, float yOffsetStep, int xPixelOffset,
            int yPixelOffset) {
        super.onOffsetsChanged(xOffset, yOffset, xOffsetStep, yOffsetStep,
                xPixelOffset, yPixelOffset);

    }

    @Override
    public void onSurfaceChanged(SurfaceHolder holder, int format,
            int width, int height) {
        super.onSurfaceChanged(holder, format, width, height);
        drawNextFrame();
    }

    @Override
    public void onSurfaceDestroyed(SurfaceHolder holder) {
        super.onSurfaceDestroyed(holder);
        _visible = false;
        _handler.removeCallbacks(Animation);

    }

    @Override
    public void onVisibilityChanged(boolean visible) {
      _visible = visible;
      if (visible) {
        _handler.post(Animation);
      } else {
        _handler.removeCallbacks(Animation);
      }
    }

    private void drawNextFrame() {

        final SurfaceHolder holder = getSurfaceHolder();

        try {
            _canvas = holder.lockCanvas();
            if (_canvas != null) {
                drawAnimation(_canvas);
            }
        } finally {
            if (_canvas != null)
                holder.unlockCanvasAndPost(_canvas);
        }

        // schedule the next frame
        _handler.removeCallbacks(Animation);
        if (_visible) {
            _handler.post(Animation);
        }

        return;

    }

    private void drawAnimation(Canvas c) {

        c.drawBitmap(_frameList.get(_currentFrame), _xOffset, _yOffset,
                new Paint());

        // IF were not at the last frame
        if (!(_currentFrame == 12)) {
            _currentFrame++;
        } else {
            _currentFrame = 0;
        }
    }

}

}


&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="@drawable/ic_launcher"
android:description="@string/livewallpaper_desc" /&gt;
</code></pre>
