학교에서 프로젝트를 진행하며 공부하고 있는 학생입니다.

alert.setPositiveButton("일정 추가", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
                      Intent intent;
                      //   Editable value = input.getText();
                        // Log.i("BopManager", "new make DirName=" + value);
                      //dialog.dismiss();
                         /* User clicked OK so do some stuff */
                      intent = new Intent(Intent.ACTION_MAIN);
             intent.setComponent(new ComponentName("exam.Input", "exam.Input.Input"));
             intent.setClassName("exam.Input", "exam.Input.Input");
             startActivity(intent);
              } 
});

위의 소스에는 없지만 gridview로 출력한 canlendar에서 날짜를 클릭하면 alertdialog가 뜨고 그안에 psoitivebutton을 추가하여 버튼을 통해 외부 Activity로 전환하려고 합니다.
그런데 줄이 쳐진 부분에서
 The method startActivity(Intent) is undefined for the type new DialogInterface.OnClickListener(){} 라는
에러가 발생하여 실행이 되지않습니다.
고수님들 도와주세요..