I checked the XML file but you are not refer the id name menucancelanalarm
to any of the TextView id name
.so that you got a error like that.
Check and find it where you have to initialize that id name in Text View.
public boolean onOptionsItemSelected(MenuItem item){
switch(item.getItemId()){
case R.id.menucancelanalarm:
Intent i = new Intent();
i.setClassName("com.mbwasi.android.handysmssender", "com.mbwasi.android.handyssmssender.CancelAnAlarmActivity");
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
finish();
break;
}
return super.onOptionsItemSelected(item);
}