错误:科特琳:不支持的插件选项:org.jetbrains.kotlin.android:enabled = true“已重新加载”

时间:2018-10-08 08:56:27

标签: android kotlin

以下问题使我发疯。

每当我从Android Studio中启动Kotlin-REPL时,都会收到以下消息:

You’re running the REPL with outdated classes: Build module 'app' and restart

 Welcome to Kotlin version 1.2.71 (JRE 1.8.0_152-release-1136-b06)  Type :help for help, :quit for quit

通过单击链接重建模块“ app”,结果为:

There were compilation errors in module app

and Error: Kotlin: Unsupported plugin option: org.jetbrains.kotlin.android:enabled=true

我刚刚在Ubuntu 18.04 LTS上全新安装了Android-Studio 3.2:

  

Android Studio 3.2内部版本#AI-181.5540.7.32.5014246,基于   2018年9月17日JRE:1.8.0_152-release-1136-b06 amd64 JVM:   JetBrains s.r.o Linux 4.15.0-36通用的OpenJDK 64位服务器VM

我还升级到了最新的Kotlin插件。

  

当前Kotlin插件版本:1.2.71-release-Studio3.2-1

我尝试了所有技巧,这些技巧在发生类似问题时会发布,但是没有帮助。

我的模块build.gradle包含:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.gisc0.myapplication"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner   
"android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 
 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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'
}

0 个答案:

没有答案