title: Android Studio Artic Fox - Java and Kotlin JVM Target - 8 vs 11
body: <p>Android Studio built-in JRE is 11 version.
  And Artic Fox allows to use Java 11 for compiling projects:</p>
  <pre><code>compileOptions {
      sourceCompatibility JavaVersion.VERSION_11
      targetCompatibility JavaVersion.VERSION_11
  }
  </code></pre>
  <p>But we also have Kotlin options</p>
  <pre><code>kotlinOptions {
      jvmTarget = JavaVersion.VERSION_1_8
  }
  </code></pre>
  <p>What JVM target version should we set now?</p>
  <p><code>jvmTarget = JavaVersion.VERSION_1_8</code> or <code>jvmTarget = JavaVersion.VERSION_11</code></p>
  <p>Kotlin library uses JDK 8:</p>
  <p><code>implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version&quot;</code></p>
  <p><code>kotlin-stdlib-jdk11</code> doesn't exist yet</p>
  <p>All next configurations works with Artic Fox:</p>
  <p>#1</p>
  <pre><code>compileOptions {
      sourceCompatibility JavaVersion.VERSION_11
      targetCompatibility JavaVersion.VERSION_11
  }
  kotlinOptions {
      jvmTarget = JavaVersion.VERSION_11
  }
  </code></pre>
  <p>#2</p>
  <pre><code>compileOptions {
      sourceCompatibility JavaVersion.VERSION_11
      targetCompatibility JavaVersion.VERSION_11
  }
  kotlinOptions {
      jvmTarget = JavaVersion.VERSION_1_8
  }
  </code></pre>
  <p>#3</p>
  <pre><code>compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
  }
  kotlinOptions {
      jvmTarget = JavaVersion.VERSION_1_8
  }
  </code></pre>
  <p>But what should we choose?</p>