Android N Java 8 features (Jack compiler) and Kotlin interop

后端 未结 8 1760
抹茶落季
抹茶落季 2020-12-22 23:19

Update 3. KOTLIN IS NOW OFFICIALLY SUPPORTED FOR ANDROID DEVELOPMENT. BY GOOGLE. YAAAAAAAAS!

Update 2: It looks like JetBrains is r

8条回答
  •  庸人自扰
    2020-12-22 23:53

    As per latest google announcement -

    We've decided to add support for Java 8 language features directly into the current javac and dx set of tools, and deprecate the Jack toolchain. With this new direction, existing tools and plugins dependent on the Java class file format should continue to work. Moving forward, Java 8 language features will be natively supported by the Android build system. We're aiming to launch this as part of Android Studio in the coming weeks, and we wanted to share this decision early with you.

    We initially tested adding Java 8 support via the Jack toolchain. Over time, we realized the cost of switching to Jack was too high for our community when we considered the annotation processors, bytecode analyzers and rewriters impacted. Thank you for trying the Jack toolchain and giving us great feedback. You can continue using Jack to build your Java 8 code until we release the new support. Migrating from Jack should require little or no work.

    So we need not worry about jack toolchain becoming default toolchain for android development. You can continue to use kotlin or use normal javac/dx set of tools.

    Source : Future of Java 8 Language Feature Support on Android

提交回复
热议问题