cannot resolve symbol(context)
<p>As still very young in android. am getting this error on this line in my code: <code>new AlertDialog.Builder(context)</code>. The error I get is cannot resolve symbol(<code>context</code>).</p>

<p>please kindly help,</p>

<pre><code>   case R.id.chk_clas1:
            //do stuff
            if (chk_clas1.isChecked()) {
                if(c1.equals("0")){
                adddate(txt_clas1);}
                clas="1";
                fdate=txt_clas1.getText().toString();

                new AlertDialog.Builder(context)
                  .setTitle("Delete entry")
                  .setMessage("Are you sure you want to delete this entry?")
                .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                                // continue with delete
                            }
                        })
                        .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int which) {
                                // do nothing
                            }
                        })
                        .setIcon(android.R.drawable.ic_dialog_alert)
                        .show();

            } else {
                txt_clas1.setText("");

            }
</code></pre>