I use this codes for Android (Java) programming:
public static MessageBoxResult showOk( Context context, String title, String message, String okMessa
I presume you are using the AlertDialog from the Support library.
If that's the case try replacing your import to android.app.AlertDialog.