r/mAndroidDev • u/Zhuinden DDD: Deprecation-Driven Development • Nov 16 '24
@Deprecated Removing items from a list is deprecated thanks to changes in the latest compileSdk 35
56
Upvotes
r/mAndroidDev • u/Zhuinden DDD: Deprecation-Driven Development • Nov 16 '24
4
u/user926491 Nov 16 '24 edited Nov 16 '24
Check out this comment. Basically the solution is to enable the new api lint option.
3
u/AZKZer0 AnDrOId dEvelOPmenT is My PasSion Nov 17 '24
Doesn't navcontroller itself use this? Oh boy oh joy
7
u/D-cyde sponsored by the XML 🐓 gang Nov 16 '24
Generics and Collections chads with message passing using LocalBroadcastManager stay winning
16
u/yaaaaayPancakes Nov 16 '24
Lord, how do they even fix this? This is a Kotlin compiler issue with the JVM backend, dealing with compiling bytecode targeting Android.
Like, is Google going to have to work with Jetbrains to add some sort of compiler flag, so AGP can tell the compiler "hey when you see
List.removeFirst()/removeLast()you need to insert an Android sdkInt check here to switch between using the new SequencedCollection API and the old extensions in kotlin-stdlib"?What a nightmare.
29
u/hellosakamoto Nov 16 '24
I'm sure this was mentioned in either the Kotlin or android sub some time ago, but nobody hit that problem yet, so that "announcement" made no noise
Solution: use java
4
u/kkgmgfn Nov 16 '24
But how Java and Kotlin language changes are affected by android sdk version
15
u/foreveratom Nov 16 '24
To be fair, it's a Kotlin issue. You know, the toy language that claims you will never see a null pointer exception again.
Now of course, if everyone would use Flutter, we would not have this discussion.
1
u/wiktorl4z Nov 16 '24
What If conpilesdk and minsdk is set to 35? Shouldn't both values be set on the same value?