title: Android Studio 4.1.1 resource linking failed
body: <p>I created a themes.xml file with this code:</p>
  <pre><code>&lt;resources xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;
      &lt;!-- Base application theme. --&gt;
      &lt;style name=&quot;Theme.MyApplication&quot; parent=&quot;Theme.MaterialComponents.DayNight.DarkActionBar&quot;&gt;
          &lt;!-- Primary brand color. --&gt;
          &lt;item name=&quot;colorPrimary&quot;&gt;@color/purple_500&lt;/item&gt;
          &lt;item name=&quot;colorPrimaryVariant&quot;&gt;@color/purple_700&lt;/item&gt;
          &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/white&lt;/item&gt;
          &lt;!-- Secondary brand color. --&gt;
          &lt;item name=&quot;colorSecondary&quot;&gt;@color/teal_200&lt;/item&gt;
          &lt;item name=&quot;colorSecondaryVariant&quot;&gt;@color/teal_700&lt;/item&gt;
          &lt;item name=&quot;colorOnSecondary&quot;&gt;@color/black&lt;/item&gt;
          &lt;!-- Status bar color. --&gt;
  
          &lt;item name=&quot;android:statusBarColor&quot; tools:targetApi=&quot;l&quot;&gt;?attr/colorPrimaryVariant&lt;/item&gt;
          &lt;!-- Customize your theme here. --&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>However, whenever I try to run this I get the following error:</p>
  <pre><code>AGPBI: {&quot;kind&quot;:&quot;error&quot;,&quot;text&quot;:&quot;Android resource linking failed&quot;,&quot;sources&quot;:[{}],&quot;original&quot;:&quot;AAPT: C:\\Users\\hagel\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:28: error: resource color/purple_200 (aka com.example.myapplication:color/purple_200) not found.\nC:\\Users\\$name\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:29: error: resource color/purple_700 (aka com.example.myapplication:color/purple_700) not found.\nC:\\Users\\$name\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:30: error: resource color/black (aka com.example.myapplication:color/black) not found.\nC:\\Users\\$name\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:32: error: resource color/teal_200 (aka com.example.myapplication:color/teal_200) not found.\nC:\\Users\\$name\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:33: error: resource color/teal_200 (aka com.example.myapplication:color/teal_200) not found.\nC:\\Users\\$name\\AndroidStudioProjects\\MyApplication\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-night-v8\\values-night-v8.xml:34: error: resource color/black (aka com.example.myapplication:color/black) not found.\nerror: failed linking references.\n\n    &quot;,&quot;tool&quot;:&quot;AAPT&quot;}
  AAPT: C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:28: error: resource color/purple_200 (aka com.example.myapplication:color/purple_200) not found.
  C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:29: error: resource color/purple_700 (aka com.example.myapplication:color/purple_700) not found.
  C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:30: error: resource color/black (aka com.example.myapplication:color/black) not found.
  C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:32: error: resource color/teal_200 (aka com.example.myapplication:color/teal_200) not found.
  C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:33: error: resource color/teal_200 (aka com.example.myapplication:color/teal_200) not found.
  C:\Users\$name\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-night-v8\values-night-v8.xml:34: error: resource color/black (aka com.example.myapplication:color/black) not found.
  error: failed linking references.
  </code></pre>
  <p>Please help me fix this,dear Angels Of Stack.</p>