Android工作室kotlin插件错误
在Android工作室即时通讯错误:
Plugin Error: Kotlin threw an uncaught AbstractMethodError. Disable Plugin
昨天一切都很好。 摇篮:
buildscript { ext.kotlin_version = '1.1.51' repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
Android工作室版本:3.0.1 Build#AI-171.4443003
更甚者:如果我用kotlin支持创建新的android项目失败,同样的错误。
#EDIT1
完整的根gradle构建脚本。
buildscript { ext.kotlin_version = '1.1.60' repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() mavenCentral() } } task clean(type: Delete) { delete rootProject.buildDir }
1.1.60没有帮助。 还是一样的错误。 而且还在得到
Your version of Kotlin runtime in 'org.jetbrains.kotlin:kotlin-stdlib:1.1.51@jar' library is 1.1.51, while plugin version is 1.1.60-release-Studio3.0-1.
即使更新到1.1.60之后
插件错误:Kotlin抛出一个未捕获的AbstractMethodError。
你应该升级kotlin_version
。 使用1.1.60
而不是1.1.51
。
ext.kotlin_version = '1.1.60'
注意
1.1.60
是BUGGY 。 降级你的版本。
然后Clean-Rebuild-Gradle
。
正如@IntelliJ Amiya提到的将kotlin插件降级到1.1.51的做法。 1.1.60越野车
- Android Studio转换为Kotlin:在某些情况下使用@JvmStatic
- 使用另一个文件Kotlin的变量
- Android Studio 3.0数据绑定参考代码不由android studio生成
- UnsupportedOperationException“android”命令不再包含在SDK中
- 可以选择Android Studio kotlin版本吗?
- Kotlin Android Project无法同步Gradle项目
- Android数据绑定构建失败后,Gradle插件更新迁移到annotationProcessor
- 找不到kotlin-reflect.jar(org.jetbrains.kotlin:kotlin-reflect:1.1.3-2)
- ResourceNotFoundException在升级到Canary 6后,在API 16 AVD上运行Kotlin项目