The Android app uses a library project to contain most of the app code, as there are two versions of the app built from the core source. Since an IntelliJ IDEA update (to v11) I
Substitute the switch
with an if/else if
construct.
int id = item.getItemId();
if(id == R.id.menu_item_one) {
// ...
}
else if(id == R.id.menu_item_two) {
// ...
}
This is neccessary since ADT 14 because the final modifier was removed from id's in the R class.
See Non-constant Fields in Case Labels