Kotlin 1.8 will completely remove Kotlin Synthetics

Kotlin 1.8 will completely remove Kotlin Synthetics

The Kotlin Android Extensions Gradle plugin was originally developed by JetBrains and released in 2017. This plugin provides two excellent features for Android development, namely Synthetics and Parcelize.

Synthetic allows developers to reduce the use of findViewById and can be achieved by binding with kotlinx.android.synthetic; while Parcelize allows developers to implement Parcelable with the @Parcelize annotation without writing template code.

Although Synthetic has good advantages, it also has disadvantages such as polluting the global namespace, not exposing nullability information, and only supporting Kotlin code.

Because of these shortcomings, the Android team later released View Binding to replace findViewById. View Binding is a feature that allows developers to more easily write code that interacts with views. Once View Binding is enabled in a module, it generates a binding class for each XML layout file in the module. An instance of the binding class contains direct references to all views that have IDs in the corresponding layout.

In order to support a better solution, in November 2020, the Android development team announced that the Android Kotlin Extensions Gradle plug-in had been deprecated and recommended that developers delete the plug-in from their projects. In order to give developers more time to complete the migration, the Android development team also extended the support period.

Now, the Android team has set a deadline for migration: the plugin will be completely removed in Kotlin 1.8, which is expected to be released at the end of 2022. By then, if your project still depends on this plugin, developers will not be able to update to the latest Kotlin version.

Developers do not need to worry about Parcelize, another feature included in this plugin. Parcelize can now be used in the independent kotlin-parcelize plugin with no functional changes.

This article is reproduced from OSCHINA

Title of this article: Kotlin 1.8 will completely remove Kotlin Synthetics

This article address: https://www.oschina.net/news/184251/discontinuing-kotlin-synthetics

<<:  How Google's Universal Search Ranking Works: Search Is Much More Than PPC

>>:  Apple iOS 16 is exposed in advance, and four new features are eye-catching

Recommend

How to master content marketing thinking?

How to infect our users through content, how to h...

How can the copywriting impress the client? You have to get market thinking

Copywriting cannot solve problems, but copywritin...

What? Fashionable socialites can actually "participate" in rocket building!

As you can imagine from the title, this is a stor...

Is it good or bad? The new Office 2016

Microsoft pointed out at the Windows 10 launch ev...

Regarding the content topic, here is an operation plan from 0 to 1

This article will try to realistically reflect th...

Tik Tok’s monetization and commercialization trends!

For commercial products, monetization is an unavo...

How to plan group buying activities on mini programs?

The author was recently responsible for designing...

The most comprehensive mind map: How to trigger user growth?

In fact, user growth systems are very common in o...

Advertising trends for entertainment apps in Q1 2019!

As the global demographic dividend wave rapidly d...

Business secrets in digital mobile Internet operations in the era of big data!

After the Double Eleven shopping festival in 2015...