title: Android libgdx wallpaper app throws NoClassDefFoundError error at startup
body: <p>I try to make livewallpaper with libgdx.</p>
  
  <p><img src="https://i.stack.imgur.com/wM3al.png" alt="enter image description here"></p>
  
  <p>I make all like <a href="http://code.google.com/p/libgdx/wiki/ApplicationConfiguration#Live_Wallpapers" rel="nofollow noreferrer">here</a>. </p>
  
  <p><img src="https://i.stack.imgur.com/jp5Ux.png" alt="enter image description here"></p>
  
  <p>My ApplicationListener:</p>
  
  <pre><code>public class GdxTestActivity implements ApplicationListener {
  
      @Override
      public void create() {
          // TODO Auto-generated method stub
  
      }
      @Override
      public void dispose() {
          // TODO Auto-generated method stub
  
      }
      @Override
      public void pause() {
          // TODO Auto-generated method stub
  
      }
      @Override
      public void render() {
          // TODO Auto-generated method stub
  
      }
      @Override
      public void resize(int arg0, int arg1) {
          // TODO Auto-generated method stub
  
      }
      @Override
      public void resume() {
          // TODO Auto-generated method stub
  
      }
  }
  </code></pre>
  
  <p>Livewallpaper.java:</p>
  
  <pre><code>public class LiveWallpaper extends AndroidLiveWallpaperService 
  {
      @Override
      public ApplicationListener createListener (boolean isPreview) {
              return new GdxTestActivity();
      }
  
      @Override
      public AndroidApplicationConfiguration createConfig () {
              return new AndroidApplicationConfiguration();
      }
  
      @Override
      public void offsetChange (ApplicationListener listener, float xOffset, float yOffset, float xOffsetStep, float yOffsetStep,
              int xPixelOffset, int yPixelOffset) {
              Gdx.app.log("LiveWallpaper", "offset changed: " + xOffset + ", " + yOffset);
      }
  </code></pre>
  
  <p>Why I see this errors when I load my application? </p>
  
  <pre><code>Link of class 'Lcom/example/gdxtest01/GdxTestActivity;' failed
  Could not find class 'com.example.gdxtest01.GdxTestActivity', referenced from method com.example.gdxtest01.LiveWallpaper.createListener
  VFY: unable to resolve new-instance 620 (Lcom/example/gdxtest01/GdxTestActivity;) in Lcom/example/gdxtest01/LiveWallpaper;
  VFY: unable to find class referenced in signature (Lcom/badlogic/gdx/ApplicationListener;)
  VFY: unable to resolve static field 726 (app) in Lcom/badlogic/gdx/Gdx;
  Link of class 'Lcom/badlogic/gdx/backends/android/AndroidLiveWallpaper;' failed
  Could not find class 'com.badlogic.gdx.backends.android.AndroidLiveWallpaper', referenced from method com.badlogic.gdx.backends.android.AndroidLiveWallpaperService$AndroidWallpaperEngine.onCreate
  VFY: unable to resolve new-instance 520 (Lcom/badlogic/gdx/backends/android/AndroidLiveWallpaper;) in Lcom/badlogic/gdx/backends/android/AndroidLiveWallpaperService$AndroidWallpaperEngine;
  VFY: unable to resolve interface method 3145: Lcom/badlogic/gdx/ApplicationListener;.dispose ()V
  Link of class 'Lcom/badlogic/gdx/backends/android/AndroidLiveWallpaper;' failed
  ...
  Link of class 'Lcom/badlogic/gdx/backends/android/AndroidLiveWallpaper;' failed
  VFY: unable to resolve instance field 1010
  02-11 21:31:51.398: threadid=1: thread exiting with uncaught exception (group=0x4001d560)
  FATAL EXCEPTION: main
  java.lang.NoClassDefFoundError: com.badlogic.gdx.backends.android.AndroidLiveWallpaper
  at com.badlogic.gdx.backends.android.AndroidLiveWallpaperService$AndroidWallpaperEngine.onCreate(AndroidLiveWallpaperService.java:108)
  at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:648)
  at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:875)
  at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:130)
  at android.app.ActivityThread.main(ActivityThread.java:3687)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>After some <a href="http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17" rel="nofollow noreferrer">magic</a> all is fine.</p>