title: Where do I find android.support.v7.mediarouter.R$attr?
body: <h2>Short version</h2>
  
  <p>I'm getting an unhandled exception when instantiating an android.support.v7.app.MediaRouteButton object. I get:</p>
  
  <pre><code>NoClassDefFoundError: android.support.v7.mediarouter.R$attr
  </code></pre>
  
  <p>Where is this class? Or if it's auto-generated, how do I get it to auto-generate?</p>
  
  <h2>Longer version</h2>
  
  <p>I am following along with the tutorial for Android app development for chromecast found here: <a href="https://developers.google.com/cast/cast_2nd-screen_app_tutorial">https://developers.google.com/cast/cast_2nd-screen_app_tutorial</a></p>
  
  <p>I am developing using the ADT bundled eclipse, on ubuntu 13.04.</p>
  
  <p>I imported the following jar files into a libs directory right in my workspace and have included them in my Java Build Path via "Add Jars..." button in the "Libraries" tab of the "Java Build Path" panel of my project's properties:</p>
  
  <ul>
  <li>GoogleCastSdkAndroid-1.0.0.jar</li>
  <li>android-support-v4.jar</li>
  <li>android-support-v7-appcompat.jar</li>
  <li>android-support-v7-gridlayout.jar</li>
  <li>android-support-v7-mediarouter.jar</li>
  </ul>
  
  <p>I have a single activity (the default "hello world" created by Eclipse), and have not modified the layout. The only code I need to add to cause the error (pasted below) to show is this:</p>
  
  <pre><code>import android.support.v7.app.MediaRouteButton;
  ...
  MediaRouteButton mrb = new MediaRouteButton(this.getApplicationContext());
  </code></pre>
  
  <p>When I build and run the app I see the error message pasted below in LogCat (I can post more of it if anyone feels it's relevant). The key things I notice are that I seem to be missing android.support.v7.mediarouter.R$attr (NoClassDefFoundError), and that it is being called from android.support.v7.app.MediaRouteButton's constructor</p>
  
  <pre><code>08-12 00:36:02.837: E/AndroidRuntime(29600): java.lang.NoClassDefFoundError: android.support.v7.mediarouter.R$attr
  08-12 00:36:02.837: E/AndroidRuntime(29600):    at android.support.v7.app.MediaRouteButton.&lt;init&gt;(MediaRouteButton.java:117)
  08-12 00:36:02.837: E/AndroidRuntime(29600):    at android.support.v7.app.MediaRouteButton.&lt;init&gt;(MediaRouteButton.java:113)
  08-12 00:36:02.837: E/AndroidRuntime(29600):    at com.jeffbmartinez.helicast.MainActivity.onCreate(MainActivity.java:31)
  ...
  </code></pre>
  
  <p>The fact that it is running the MediaRouteButton's constructor leads me to believe the jar files are being properly found so I don't think I misconfigured eclipse in relation to the dependencies (jar files). However, my understanding is that these 'R' files are auto-generated. If this is correct, where is my android.support.v7.mediarouter.R file? I do not see it in the gen directory, which where com.jeffbmartinez.helicast.R file is being placed.</p>
  
  <p>Furthermore, I find it curious that the MediaRouteButton refers to a package name that I cannot find in any of the 5 jar dependencies listed above. android-support-v7-mediarouter.jar contains only <strong>android.support.v7.app.*</strong> and <strong>android.support.v7.media.*</strong>.</p>
  
  <p>The only place I find reference to <strong>android.support.v7.mediarouter</strong>, aside from my error logs, is at <a href="https://developer.android.com/reference/android/support/v7/mediarouter/package-summary.html">https://developer.android.com/reference/android/support/v7/mediarouter/package-summary.html</a> but there is little information there.</p>
  
  <p>Am I missing a dependency? If so, where do I get it or how do I generate it?</p>
  
  <p>Thanks!</p>