title: Android Gradle referencing styles from dependent module
body: <p>so I have an Android project in Android Studio (0.6.1). There are 2 Modules <strong>A</strong> and <strong>B</strong>. <strong>A</strong> is my main-module and it depends on <strong>B</strong> which includes various resources (drawables, strings, styles) and therefore functions as something like a library (although it is no library-project). I added <strong>B</strong> as git-subtree, included it in my settings.gradle and building works fine.</p>
  
  <p><strong>Now there is a problem:</strong> I want to reference resources from <strong>B</strong> in <strong>A</strong>. For drawables I already found out <a href="https://stackoverflow.com/questions/4036746/android-library-using-main-project-resources/4036895#4036895">here</a> that I can just create dummy resources in <strong>A</strong> that will be overridden by <strong>B</strong>. But unfortunately that <strong>doesn't work for styles</strong>, that are defined in <strong>B</strong>. The dummies I create in styles.xml in <strong>A</strong> are not overwritten.</p>
  
  <p>My aim is to define multiple styles in <strong>B</strong> like:</p>
  
  <pre><code>&lt;style name="ButtonStyle1" parent="android:Widget.Button"&gt;
      &lt;item name="android:layout_width"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:minWidth"&gt;200dp&lt;/item&gt;
      &lt;item name="android:background"&gt;@drawable/buttonorange&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@android:color/black&lt;/item&gt;
  &lt;/style&gt;
  &lt;style name="ButtonStyle2" parent="android:Widget.Button"&gt;
      &lt;item name="android:layout_width"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:minWidth"&gt;200dp&lt;/item&gt;
      &lt;item name="android:background"&gt;@drawable/buttonorange&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@android:color/black&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>And then back in <strong>A</strong> I want to have the opportunity to choose wether to apply ButtonStyle1 or ButtonStyle like:</p>
  
  <pre><code>&lt;style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"&gt;
      &lt;item name="android:buttonStyle"&gt;@style/ButtonStyle1&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"&gt;
      &lt;item name="android:buttonStyle"&gt;@style/ButtonStyle2&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>But when I do this, I always get 
  <code>Error:(5, 42) No resource found that matches the given name (at 'android:buttonStyle' with value '@style/ButtonStyle1').</code></p>
  
  <p>All in all I guess that my gradle configuration itself is correct because overriding drawables works fine already. <strong>So what am I doing wrong - how can I reference styles defined in B in A?</strong></p>
  
  <p><strong>settings.gradle</strong></p>
  
  <pre><code>include ':app', ':uiframework:uiframework'
  </code></pre>
  
  <p><strong>build.gradle from A</strong></p>
  
  <pre><code>apply plugin: 'android'
  
  android {
      compileSdkVersion 19
      buildToolsVersion '19.1.0'
      defaultConfig {
          applicationId 'com.example.uiframeworkexample'
          minSdkVersion 14
          targetSdkVersion 19
          versionCode 1
          versionName '1.0'
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      productFlavors {
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile project(':uiframework:uiframework')
  }
  </code></pre>