Mobile development: The Android Kotlin extensions land on the siding
Source: Heise.de added 24th Nov 2020JetBrains has declared the Android Kotlin Extensions to be deprecated and will switch them off in the medium term. The 2017 started extension for Android development with the programming language Kotlin contains two packages: Synthetic Views and Parcelize. Originally JetBrains wanted to expand the collection, but has not added any new tools.
The extension will be switched off as part of the release of Kotlin 1.4. 20, but has been in the room for a long time. To avoid confusion: The deactivation affects the package org.jetbrains.kotlin.android.extensions and not the Android KTX library contained in Android Jetpack.
Android home remedies instead of synthetics The synthetic views in kotlinx.android.synthetics offer bindings of UI elements, with which the detour via calling findViewById not applicable. In the meantime, Google has introduced a library called View Binding as part of Android Jetpack, which does the same job.
Therefore, JetBrains introduced Kotlin 1.4. 20 declared the Synthetic Views obsolete and will remove them in the medium term. Until then, a deprecation warning appears when integrating. A guide should help when switching to the view binding library in Android Jetpack
Independently delivered package As there is no direct replacement for the second part of the Android Extension, JetBrains is outsourcing the Parcelize functions to the separate extension kotlinx.parcelize . Developers only have to adapt the integration of the library and can continue to use the @ Parcelize annotation as usual.
The Extension simplifies the handling of implementations of the Parcelable interface, the Android as an alternative to the standard Java interface Serializable and that works without reflection. With the annotation, boilerplate code can be avoided, since the explicit definition of methods such as writeToParcel , which is otherwise required, is not required.
Others Details can be found on the Android developer blog. The Android Kotlin Extensions will therefore disappear for good in September 2021 at the earliest. The maintenance of the plug-in kotlin-parcelize should continue in the long term.
(rme)
brands: Google RME media: Heise.de keywords: Android Google Mobile
Related posts
Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88
Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88
Related Products
Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91
Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91