I\'m trying to open a dialog window, but every time I try to open it it throws this exception:
Uncaught handler: thread main exiting due to uncaught exceptio
This Worked for me--
new AlertDialog.Builder(MainActivity.this)
.setMessage(Html.fromHtml("Spread Knowledge Unto The Last"))
.setCancelable(false)
.setPositiveButton("Dismiss",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
}).show();
Use
ActivityName.this