title: Android Studio 3.1 Cannot Resolve Symbol (Themes, Widget, attr, etc.)
body: <p>I upgraded Android Studio today to 3.1, and now Android Studio says it cannot resolve symbols for most of the resources (for example <code>ThemeOverlay</code> in <code>styles.xml</code> or <code>?attr/actionBarSize</code>). This doesn't seem to prevent me from building or running in an emulator so far, but these errors are making me nervous.</p>
  
  <p>Has anyone else experienced this issue? How can I go about resolving it? I have tried syncing gradle and cleaning my project but it doesn't seem to help at all.</p>
  
  <p>Any ideas?</p>
  
  <p>I'm using Android Studio 3.1 with Gradle version 4.4 and Gradle Plugin 3.1.0</p>
  
  <p><strong>EDIT:</strong>
  This issue affects updating to Android Studio 3.1.1, 3.1.2, 3.1.3, 3.1.4 as well as Gradle Plugin to 3.1.1, 3.1.2, 3.1.3, and 3.1.4. However, the answer below still works.</p>