I got a lint warning on EVERY (already existing) sharedPreferences.edit() call after updating Android Studio to Bumblebee 2021.1.1 Patch 2 from 4.2.1
What's interesting, is that when I use it like this, I get the warning:
sharedPreferences.edit()
.putBoolean("example", true)
.apply()
But when I save it in a variable like this, I get no warning:
val sharedPrefEdit = sharedPreferences.edit()
.putBoolean("example", true)
.apply()
Any ideas why it's happening?
Any ideas how to resolve/prevent the warning without saving this operation in a variable unnecessarily?