title: IntelliJ Kotlin - How do I fix "Ensure that you have a dependency on the Kotlin standard library" in a project?
body: <p>I've been trying to set up a new Kotlin project in IntelliJ IDEA, using the default IntelliJ Build System (not Gradle) and JDK 15. Whenever it creates the default main.kt file, and I try to build and run the main function, which looks like this:</p>
  <pre class="lang-kotlin prettyprint-override"><code>fun main(args: Array&lt;String&gt;) {
      println(&quot;Hello World!&quot;)
  }
  </code></pre>
  <p>the build fails after a short time with the following errors:</p>
  <blockquote>
  <p>Kotlin: Cannot access built-in declaration 'kotlin.Array'. Ensure that you have a dependency on the Kotlin standard library</p>
  </blockquote>
  <blockquote>
  <p>Kotlin: Cannot access built-in declaration 'kotlin.String'. Ensure that you have a dependency on the Kotlin standard library</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>Kotlin: Unresolved reference: println</p>
  </blockquote>
  <p>I've tried changing the project SDK to the kotlin SDK, to Java 14 and to Java 1.8. I'm not sure exactly how to add the dependency it asks for. Any help is appreciated.</p>
  <p>This is what the dependencies window shows within the project:
  <a href="https://i.stack.imgur.com/Aw08d.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Aw08d.jpg" alt="Module Dependencies" /></a></p>
  <p>Right now the project is using JDK 15, and Kotlin 1.4.10. I've tried updating the plugin, uninstalling and reinstalling, deactivating and reactivating, all to no avail.</p>
  <p>The project files can be found <a href="https://drive.google.com/file/d/10u4ZXcC6zg_Wj6YyDrKHJwXQYjOHOOJ5/view?usp=sharing" rel="noreferrer">here on Google Drive</a></p>