- Open Android Studio
- Go to Plugins ( you can use find action shortcut: shift + command + a on Mac and type plugins )
- Find ( search for Kotlin) and install
- Restart Android Studio when done downloading
- Go to your project (or create a new Android project)
- Convert Java File to Kotlin
- After waiting for IDE to complete conversion , Configure Kotlin, leave everything by default
- Add one line in the module Gradle file for Kotlin Android dextension kotlinx.android.sythetic.<layout_xml>.* to work
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
- Sync Gradle
- If you have any trouble , check the official document.
2015年9月6日 星期日
Kotlin for Android Developers ( Part 1 )
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言