Run Time Error : Can't create handler inside thread that has not called looper.prepare()
<p>I have written the following code to display the first page and then after 5 seconds, it will display the main menu. However, I got the error "Can't create handler inside thread that has not called looper.prepare()". What's it about and how to solve it?
`</p>

<pre><code>public class LoadingScreen extends Screen{
    public LoadingScreen(MBGame game) {
    super (game);
   }    
    @Override
      public void update(float deltaTime) {
        Graphics g = game.getGraphics();
        Assets.firstPage = g.newPixmap("first_page.png", PixmapFormat.RGB565);
        game.setScreen(new StartupScreen(game));
        new AsyncTask&lt;Object, Object, Object&gt;() { 

            protected Object doInBackground(Object... params) { 
               try { 
                   Looper.prepare();
                   Thread.sleep(5000000);
                   Looper.loop();

                  } catch (InterruptedException e) { 
                    // Exception handling
                } 
                return (Object)null; 
            } 

            protected void onPostExecute(Object result) { 
              // This runs on UI thread 
              game.setScreen(new MainMenuScreen(game)); 

            } 
        }.execute((Object) null);                
    }    
        @Override
           public void present(float deltaTime) {    
    }    
        @Override
           public void pause() {    
    }    
        @Override
           public void resume() {    
    }    
        @Override
           public void dispose() {          
    }

}
</code></pre>

<p>Thank you.</p>
