What does the following exception mean; how can I fix it? This is the 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();
}
This is the exception:
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.<init>(Handler.java:205)