[英]Why is kotlin not working in android studio with the kotlin plugin install
參見https://kotlinlang.org/docs/reference/using-gradle.html#targeting-android
buildscript {
ext.kotlin_version = '<version to use>'
...
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
看來您想念
apply plugin: 'com.android.application'
Android Studio 2.3.3不支持Kotlin SDK下載Android Studio 3.0
https://developer.android.com/studio/preview/index.html
最初,谷歌宣布Kotlin支持Android Studio 3.0 +。 Canary頻道提供了Android Studio 3.0。 嘗試與Android Studio 3.0 Canary一起使用,以獲取適量的支持並簡化Kotlin Android語言。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.