title: Menu item IDs in an Android library project?
body: <p>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'm getting this warning on each of the case statements below:</p>
  
  <pre><code>Resource IDs cannot be used in a switch statement in Android library modules
  </code></pre>
  
  <p>Here's the code:</p>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
          case R.id.menu_item_one:   // Build error here
              // Do stuff
              return true;
          case R.id.menu_item_two:   // Build error here
              // Do stuff
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>OK, so if I can't reference them via their ID, how DO I reference them?</p>