不支持Kotlin和Jack(Android Studio 2.3.2) [英] Kotlin and Jack unsupported (Android Studio 2.3.2)

查看:266
本文介绍了不支持Kotlin和Jack(Android Studio 2.3.2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Jack配置kotlin插件时出现此错误.我目前正在使用Android Studio 2.3.2.

I am getting this error while configuring kotlin plugin with Jack. I an using Android studio 2.3.2 currently.

错误:Kotlin Gradle插件不支持不推荐使用的Jack工具链.禁用Jack或恢复为Kotlin Gradle插件版本 1.1.1.

Error:Kotlin Gradle plugin does not support the deprecated Jack toolchain. Disable Jack or revert to Kotlin Gradle plugin version 1.1.1.

推荐答案

如果您使用的是最新的IDE(3.0,预览版),则将不允许您使用Jack,或者您使用的是1.1.1以上的kotlin版本.

If you are using latest IDE(3.0, preview version) it won't let you use Jack or you are using kotlin version above 1.1.1.

由于构建时间性能问题,杰克已被弃用,在google IO 2017的一个会议中提到了它.您可以阅读此

Jack has been deprecated because of the build time performance issue, It was mentioned in one of the session of google IO 2017. You can read this blog

在杰克的官方文档中,给出以下警告:

In official documentation of Jack following warning is given:

根据此

The Jack toolchain is deprecated, as per this announcement. However, you may continue to use it to enable Java 8 language features until the replacement is available.

如果您仍要使用它,请将您的Android Studio IDE切换回2.3,然后再还原回kotlin 1.1.1

If you still want to use it, switch back you Android studio IDE to 2.3, and revert back to kotlin 1.1.1

编辑

Kotlin默认情况下支持Lambda表达式.如果您还想在Kotlin中使用Java中的lambda表达式,则必须使用Android Studio 3.0.

Kotlin by default supports Lambda expressions. If you want to use lambda expression in java with Kotlin also, you have to use Android Studio 3.0.

这篇关于不支持Kotlin和Jack(Android Studio 2.3.2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆