Java tutorial
//package com.java2s; import android.app.AlertDialog; import android.content.Context; public class Main { public static void showAlertError(Context context, String Error) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Error"); alertDialog.setMessage(Error); alertDialog.show(); } }