Can't create handler inside thread Thread[Thread-5,5,main] that has not called Looper.prepare() : <p>What does the following exception mean; how can I fix it?
<strong>This is the code:</strong></p>

<pre><code>    if (response.isSuccessful()) {
                        String message = response.body().string();
                        JSONObject jsonObject = new JSONObject(message);

                        new AlertDialog.Builder(mcontext)
                                .setTitle("title：")
                                .setMessage(TmpPwd)
                                .setPositiveButton("close", new DialogInterface.OnClickListener() {
                                    @Override
                                    public void onClick(DialogInterface dialog, int which) {
                                    }
                                })
                                .show();
                    }
</code></pre>

<p><strong>This is the exception:</strong></p>

<pre><code>    W/System.err: java.lang.RuntimeException: Can't create handler inside thread Thread[Thread-5,5,main] that has not called Looper.prepare()
        at android.os.Handler.&lt;init&gt;(Handler.java:205)
</code></pre>
