title: Override resources in library android
body: <p>I'm using my own library. In this library I defined some resources:</p>
  
  <p><code>colors.xml</code> (library)</p>
  
  <pre><code>&lt;color name="colorPrimary"&gt;#000000&lt;/color&gt;
  </code></pre>
  
  <p>In my app (that uses the above library). I want to override that color primary.</p>
  
  <p><code>colors.xml</code> (app)</p>
  
  <pre><code>&lt;color name="colorPrimary"&gt;#ffffff&lt;/color&gt;
  </code></pre>
  
  <p>I actually want to override that attribute so that the library (and my app) use the overrided one, not the declared one from library. It works fine but Android Studio keeps yelling out that:</p>
  
  <blockquote>
    <p>Overriding @color/colorPrimary which is marked as private in my_lib. If deliberate, use tools:override="true", otherwise pick a different name". That makes me think that this is not a good approach.</p>
  </blockquote>
  
  <p>I also try to add <code>tools:override="true"</code> to the resource:</p>
  
  <pre><code>&lt;resources xmlns:tools="http://schemas.android.com/tools"
         tools:override="true"&gt;
  </code></pre>
  
  <p>but the warning still there.</p>
  
  <p>Is there any wrong with what I'm doing?. I can not pick another name because I want the library to use the overrided values.</p>
  
  <p>I'm using <code>Android Studio 2.1.1</code> and <code>gradle 2.1.0</code> version.</p>
  
  <p>Thanks.</p>