title: Robolectric 3.0 - java.lang.NoClassDefFoundError: android/support/v7/appcompat/R$styleable when testing library module
body: <p>I recently upgraded my <code>Robolectric</code> from <strong>2.4</strong> to <strong>3.0-rc3</strong> and after a lot of wrestling with it, I've narrowed it down to this last error where a few cases fail because of this <strong>issue:</strong></p>
  
  <pre><code>java.lang.NoClassDefFoundError: android/support/v7/appcompat/R$styleable
  </code></pre>
  
  <p>It passes like 99% of the cases, but a few are failing because of this. The other components of my application all pass with flying colors, and I've only seen it happen in my module.</p>
  
  <p>I looked it up and it seems that the problem stems from <code>Robolectrie 3.0</code> not generating the <code>R.java</code> files. However, there didn't seem to be a solution for it, save for some <code>build.gradle</code> hack that didn't work for me. I also already tried editing <code>targetSDK</code>s and making sure the <code>AppCompat</code> theme was set in the manifest, to no avail.</p>
  
  <p><strong>build.gradle:</strong></p>
  
  <pre><code>apply from: rootProject.file('src/build/groovy/android-library.gradle')
  
  dependencies {
      compile project(':myApplication')
  
      compile('com.application:player:') {
      exclude module: 'support-v4'
  }
  
  
      compile "com.android.support:support-v4:19.1.0"
      compile 'com.android.support:cardview-v7:21.0.+'
      compile "com.android.support:appcompat-v7:22.1.0"
  }
  </code></pre>
  
  <p>Does anybody have any idea how to fix this? It's sinking a lot of my time!</p>