Using App namespace in style
<p>I am going to give an example to demonstrate the greater point.</p>

<p>Imagine my app has a number of FloatingActionButtons. Consequently, I want to create one style and reuse it. So I do the following:</p>

<pre><code>&lt;style name="FabStyle” parent ="Widget.Design.FloatingActionButton"&gt;
    &lt;item name="android:layout_width"&gt;wrap_content&lt;/item&gt;
    &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
    &lt;item name="android:layout_margin"&gt;16dp&lt;/item&gt;
    &lt;item name="app:backgroundTint"&gt;@color/accent&lt;/item&gt;
    &lt;item name="app:layout_anchorGravity"&gt;end|bottom&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>The problem I am having is that the code is not compiling because it is complaining about</p>

<pre><code>Error:(40, 5) No resource found that matches the given name: attr 'app:backgroundTint'.
</code></pre>

<p>I tried bringing the namespace in through the <code>resources</code> tag but that is not working</p>

<pre><code>&lt;resources
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android"
    &gt;
</code></pre>

<p>Any ideas how I might get this to work?</p>