title: android build error Failed linking resources
body: <p>I uninstalled a previous version of android and just have install version3.0.1 I created a new application in android studio scratch I have not modified any code but when I try to build the project I get the following errors </p>
  
  <pre><code>Error:resource style/Theme.AppCompat.Light.DarkActionBar (aka com.example.android.my:style/Theme.AppCompat.Light.DarkActionBar) not found.
  C:\AndroidStudioProjects\MyAPP\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
  Error:(101) error: style attribute 'attr/colorPrimary (aka com.example.android.my:attr/colorPrimary)' not found.
  Error:(102) error: style attribute 'attr/colorPrimaryDark (aka com.example.android.com.example.android.my:attr/colorPrimaryDark)' not found.
  Error:(103) error: style attribute 'attr/colorAccent (aka com.example.android.my:attr/colorAccent)' not found.
  Error:(101) style attribute 'attr/colorPrimary (aka com.example.android.my:attr/colorPrimary)' not found.
  Error:(102) style attribute 'attr/colorPrimaryDark (aka com.example.android.my:attr/colorPrimaryDark)' not found.
  Error:(103) style attribute 'attr/colorAccent (aka com.example.android.my:attr/colorAccent)' not found.
  Error:failed linking references.
  Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:Execution failed for task ':app:processDebugResources'.
  &gt; Failed to execute aapt
  </code></pre>
  
  <p>This is my <code>build.gradle</code> file </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 26
  defaultConfig {
      applicationId "com.example.android.my"
      minSdkVersion 21
      targetSdkVersion 26
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner 
     "android.support.test.runner.AndroidJUnitRunner"
  }
    buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'p 
          roguard-rules.pro'
      }
    }
  }
  
   dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation 'com.android.support:appcompat-v7:26.1.0'
     implementation 'com.android.support.constraint:constraint-layout:1.0.2'
     testImplementation 'junit:junit:4.12'
     androidTestImplementation 'com.android.support.test:runner:1.0.1'
     androidTestImplementation 'com.android.support.test.espresso:espresso-
    core:3.0.1'
   }
  </code></pre>
  
  <p>And this is my <code>values.xml</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;attr format="reference" name="constraintSet"/&gt;
  &lt;attr format="integer" name="layout_constraintBaseline_creator"/&gt;
    ..... some codes here ....
   &lt;attr format="dimension" name="layout_goneMarginTop"/&gt;
   &lt;attr name="layout_optimizationLevel"&gt;
       &lt;flag name="none" value="1"/&gt;
       &lt;flag name="all" value="2"/&gt;
       &lt;flag name="basic" value="4"/&gt;
       &lt;flag name="chains" value="8"/&gt;
   &lt;/attr&gt;
   &lt;color name="colorAccent"&gt;#FF4081&lt;/color&gt;
   &lt;color name="colorPrimary"&gt;#3F51B5&lt;/color&gt;
   &lt;color name="colorPrimaryDark"&gt;#303F9F&lt;/color&gt;
    &lt;declare-styleable name="ConstraintLayout_Layout"&gt;&lt;attr name="android:orientation"/&gt;&lt;attr name="android:minWidth"/&gt;
    .... some more attributes here ....
  
  &lt;string name="app_name"&gt;MyAppName&lt;/string&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
        &lt;!-- Customize your theme here. --&gt;
        &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
         &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
         &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
     &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>It seems that that error are some strange behaviors in android studio I have invalidated caches and restarted the project but the issue still exists, 
  How should I solve this issue? </p>