Android Studio 舊 Java 專案加入 kotlin support
1. Check android studio version
2. Check Preferences plugins Kotlin installed
3. Go to https://kotlinlang.org/docs/releases.html, check release details
4. Open Android Studio Project
ext.kotlin_version = '1.4.31' (此處數字為 Release details 版本)
classpath "org.jetbrains.kotlin:kotlin-gradle-plugon:$kotlin_version" ($為前一行定義的版號)
7. Update build.gradle(module)
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
10. Sync Now
11. Wait download ...
Done
留言
張貼留言