Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You need Android Studio 3.3.x, or later. You may either start with a new project or an existing project.  

...

Start with an

...

Existing Project

  1. Goto Tools|Kotlin|Configure Kotin in Project

  2. You will present with a dialog with two options. Choose "Android with Gradle":
     
  3. Choose the "app" to enable Kotlin integration (choose the latest version corresponding to the plugin on your IDE):

...

Code Block
languagegroovy
themeConfluence
titlebuild.gradle (app)
linenumberstrue
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

// omitted... 

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}


Start with a New Project

  1. Start with the new project wizard on Android studio.
  2. Choose "Kotlin" language:

...