title: expected java.lang.string, found kotlin.string. error in kotlin gradle in intellij
body: <p>I generate a skeleton <code>kotlin application</code> via <code>gradle init --dsl kotlin</code> -> load the project into intellij and I receive following error. screenshot attached.</p>
  
  <p><code>Type mismatch : inferred type is kotlin.String but java.lang.String was expected.</code></p>
  
  <p>I have tried various steps of invalidating caches/restart. removing .gradle, .idea, ~/.gradle etc. refreshing gradle projects, stopping gradle daemon. refreshing intellij project (Removing ~/.intellijIDea../system dir). However, none have helped. please tell me what else can I do ?</p>
  
  <p>as I said, I generated project via <code>gradle init --dsl kotlin</code>. gradle version 5.2.1, kotlin plugin version 1.3.20. all latest. intellij idea is at 2018.3 version. For starters, <code>build.gradle.kts</code> is as follows:</p>
  
  <pre class="lang-kotlin prettyprint-override"><code>plugins {
      // Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
      id("org.jetbrains.kotlin.jvm").version("1.3.20")
  
      // Apply the application plugin to add support for building a CLI application.
      application
  }
  
  repositories {
      // Use jcenter for resolving your dependencies.
      // You can declare any Maven/Ivy/file repository here.
      jcenter()
  }
  
  dependencies {
      // Use the Kotlin JDK 8 standard library.
      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  
      // Use the Kotlin test library.
      testImplementation("org.jetbrains.kotlin:kotlin-test")
  
      // Use the Kotlin JUnit integration.
      testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
  }
  
  application {
      // Define the main class for the application.
      mainClassName = "info.XXX.YYY"
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6prCu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6prCu.png" alt="enter image description here"></a></p>