title: Android Studio 3.1: Erroneous unresolved references in editor
body: <p>I'm running Ubuntu 17.10, and I've just updated <em>Android Studio</em> from version 3.0.1 to 3.1. Here's the version information in Help -&gt; About:</p>
  <pre><code>Android Studio 3.1
  Build #AI-173.4670197, built on March 22, 2018
  JRE: 1.8.0_152-release-1024-b01 amd64
  JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  Linux 4.13.0-37-generic
  </code></pre>
  <p>Unfortunately, while the IDE was able to resolve android-specific references before in my (first ever) Kotlin project, in the new version it appears unable to. Here's a screenshot showing what I mean:</p>
  <p><a href="https://i.stack.imgur.com/zFa9n.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zFa9n.png" alt="" /></a></p>
  <p>In <em>Android Studio</em> 3.1, it's claiming that core Android functions such as <code>setContentView()</code> don't exist, and keeps prompting me to create an abstract function for it - which I clearly don't want to do. However, if I hit the build button, I get a <code>BUILD SUCCESSFUL in 8s</code>.</p>
  <p>Why is my editor doing this, and how I get get Android-related functions and classes to resolve correctly again?</p>
  <ul>
  <li>Build → Clean and then Build → Rebuild doesn't help.</li>
  <li>File → Invalidate Caches and Restart doesn't help either</li>
  <li>Neither does a manual Gradle sync.</li>
  <li>A different project that's written in Java instead of Kotlin works fine.</li>
  <li><a href="https://github.com/sbrl/Pepperminty-Wiki-Client-Android" rel="noreferrer">Link to the project I'm experiencing issues with</a> (it's open-source)</li>
  </ul>