looper error while running AsyncTask?
<pre><code>05-18 17:53:35.318: WARN/System.err(474): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
05-18 17:53:35.349: WARN/System.err(474):     at android.os.Handler.&lt;init&gt;(Handler.java:121)
05-18 17:53:35.349: WARN/System.err(474):     at android.app.Dialog.&lt;init&gt;(Dialog.java:101)
05-18 17:53:35.358: WARN/System.err(474):     at android.app.AlertDialog.&lt;init&gt;(AlertDialog.java:63)
05-18 17:53:35.358: WARN/System.err(474):     at android.app.ProgressDialog.&lt;init&gt;(ProgressDialog.java:80)
05-18 17:53:35.377: WARN/System.err(474):     at android.app.ProgressDialog.&lt;init&gt;(ProgressDialog.java:76)
05-18 17:53:35.377: WARN/System.err(474):     at com.Utils.SProgress.StartProgress(SProgress.java:42)
05-18 17:53:35.387: WARN/System.err(474):     at com.FindMe.DisplayAtms$Asyctast.onPreExecute(DisplayAtms.java:880)
05-18 17:53:35.400: WARN/System.err(474):     at android.os.AsyncTask.execute(AsyncTask.java:391)
05-18 17:53:35.400: WARN/System.err(474):     at com.FindMe.DisplayAtms.LoadFunction(DisplayAtms.java:141)
05-18 17:53:35.408: WARN/System.err(474):     at com.FindMe.MyApplication$AsyncATMS.doInBackground(MyApplication.java:207)
05-18 17:53:35.419: WARN/System.err(474):     at com.FindMe.MyApplication$AsyncATMS.doInBackground(MyApplication.java:1)
05-18 17:53:35.419: WARN/System.err(474):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
05-18 17:53:35.427: WARN/System.err(474):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
05-18 17:53:35.438: WARN/System.err(474):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
05-18 17:53:35.438: WARN/System.err(474):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
05-18 17:53:35.447: WARN/System.err(474):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
05-18 17:53:35.458: WARN/System.err(474):     at java.lang.Thread.run(Thread.java:1096)
</code></pre>

<p>my code</p>

<pre><code>Another function()
{

anotherSingletonprogressdiloag.hide();

.new Asyctast().execute();


}




public class Asyctast extends AsyncTask&lt;Void, Object, Void&gt;
    {

     private ProgressDialog dialog = new ProgressDialog(DisplayAtms.this);

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            dialog.show();

        }


       @Override
        protected void onProgressUpdate(final Object... args) {
            super.onProgressUpdate(args);
            if ((Boolean) args[0]) {
                Toast.makeText(DisplayAtms.this, args[1].toString(),
                        Toast.LENGTH_LONG).show();
            }
        }

       @Override
        protected Void doInBackground(Void... arg0) {
             Log.d("Asynctask", ""+arg0);  


                publishProgress(true,"sd sdfsdf");


                return null;

        }

    }
</code></pre>

<p>i am starting thread this task after another dialog placed in signleton class is stopped  and then i am trying to start another progress dialog inside asyncTask 
so this second dialog onPreexecute raise looper error any one guide me how to get rid of this issue?</p>
