question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kotlin Android Extensions & Butterknife are deprecated

See original GitHub issue

Summary:

Looking at “The future of Kotlin Android Extensions” from 23 November 2020, (see: https://android-developers.googleblog.com/2020/11/the-future-of-kotlin-android-extensions.html)

The deprecation period starts with Kotlin 1.4.20, released today. android-kotlin-extensions will be removed in a future Kotlin release during or after September 2021. Long term, we will continue to maintain the kotlin-parcelize plugin, and you can continue to file issues on Parcelize in the Android Studio issue tracker.

According to Google (https://developer.android.com/topic/libraries/view-binding/migration)

Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported. If your app uses Kotlin synthetics for view binding, use this guide to migrate to Jetpack view binding.

In addition, the author of Butternife has stated (https://github.com/JakeWharton/butterknife)

Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only critical bug fixes for integration with AGP will be considered. Feature development and general bug fixes have stopped.

Would you like to work on the issue?

It looks like a pretty big migration, with a large number of files that will be touched. A search for import butterknife.BindView shows 40 files, and import kotlinx.android.synthetic a further 16 files; probably too big for a single person and something to do in stages. I would be happy to be part of the process.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
madhurgupta10commented, Oct 14, 2021

@misaochan Yes sure, even more than one PR per package would be okay IMO.

I will create a PR with the necessary dependencies and an example so it is easier for first-time contributors to follow up 😃

1reaction
pshcommented, Nov 22, 2022

Looking at Github documentation and feature requests, it seems you cant disable the auto-closing feature and the suggested quick workaround is to avoid the keywords in PR comments that trigger it. So, avoid saying “Fixes #4664” and maybe say something like “This PR relates to #4664” instead. In theory that will generate a link without this issue being closed when the PR merges.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The 'kotlin-android-extensions' Gradle plugin is deprecated
Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported.
Read more >
Why Are Kotlin Synthetics Deprecated and What Are the ...
(Note: Butter Knife is now deprecated.) Kotlin Synthetics to the rescue. With the Android Kotlin Extensions Gradle plugin released in 2017 came Kotlin ......
Read more >
The future of Kotlin Android Extensions
The deprecation period starts with Kotlin 1.4.20, released today. android-kotlin-extensions will be removed in a future Kotlin release ...
Read more >
kotlin-android-extensions plugin will be deprecated ... - Reddit
JB says nothing because there is no official deprecation in any released version. · Synthetics have no support for a long time and...
Read more >
Kotlin Android Extensions: Say goodbye to findViewById (KAD ...
Kotlin Android Extensions are deprecated, you should start using View Binding. ... Or maybe you gave up and started using the famous Butterknife...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found