Android Studio 3.1 - kotlin plugin does not work

妖精的绣舞 提交于 2019-12-11 09:23:25

问题


I updated my AS from 3.0 to 3.1. After fixing several issues that showed up with the update, I am stuck at making Kotlin work.

Kotlin code compiles and runs, although I can't edit kotlin files. Kotlin keywords are not recognised by the editor, using kotlin code from java classes appear red and in general I can't really do anything with kotlin.

I use:

buildscript {
    ext.kotlin_version = '1.2.41'

    ...
    ...

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

kotlin plugin: 1.2.41-release-Studio3.1-1 and org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version

来源:https://stackoverflow.com/questions/50098853/android-studio-3-1-kotlin-plugin-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!