title: Error: Could not get unknown property 'iosX64' for KotlinTargetPreset in Android Studio 3.1.4?
body: <p>Hi I am new to Android and Kotlin environment, I am from native iOS background.</p>
  
  <p>I want to create a Kotlin MultiPlatform app and it is run-on both Android and iOS.</p>
  
  <p>For this I am following this 
  <a href="https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html" rel="nofollow noreferrer">https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html</a></p>
  
  <p>After complete the <strong>Updating Gradle Scripts</strong> process from the above documentation I am facing issue like:</p>
  
  <p><strong>Could not get unknown property 'iosX64' for KotlinTargetPreset container of type org.gradle.api.internal.FactoryNamedDomainObjectContainer.</strong></p>
  
  <p>and my build.gradle file path is <strong>/Kotlin_Practice/KTMPDemo/SharedCode/build.gradle</strong></p>
  
  <h2>build.gradle</h2>
  
  <pre><code>apply plugin: 'kotlin-multiplatform'
  
  kotlin {
      targets {
          final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
                                ? presets.iosArm64 : presets.iosX64
          fromPreset(iOSTarget, 'iOS') {
              compilations.main.outputKinds('FRAMEWORK')
          }
          fromPreset(presets.jvm, 'android')
      }
      sourceSets {
          commonMain.dependencies {
              api 'org.jetbrains.kotlin:kotlin-stdlib-common'
          }
          androidMain.dependencies {
              api 'org.jetbrains.kotlin:kotlin-stdlib'
          }
      }
  }
  // workaround for https://youtrack.jetbrains.com/issue/KT-27170
  configurations {
      compileClasspath
  }
  </code></pre>
  
  <p>Can I update / downgrade my Gradle ?? How can I fix this above issue? 
  Thank you.</p>
  
  <p>My system Configuration:</p>
  
  <p>Mac mini (Late 2014), macOS High Sierra, v10.13.5.</p>
  
  <p>Android Studio Android Studio 3.1.4</p>
  
  <p>Build #AI-173.4907809, built on July 24, 2018</p>
  
  <p>JRE: 1.8.0_152-release-1024-b01 x86_64</p>
  
  <p>JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o</p>