https://kotlinlang.org logo
#android
Title
# android
p

paulex

07/23/2018, 7:26 PM
why does code get buggy certain times when the kotlin plugin is updated
s

Seri

07/23/2018, 8:08 PM
you probably need to gradle resync
p

paulex

07/23/2018, 8:32 PM
i think it has to do with google adding annotations to libraries
e.g getting complaints like "overrides nothing"
r

rook

07/23/2018, 9:01 PM
overrides nothing
means that the signature of the thing being overridden doesn’t match anything in the object’s inheritance
p

paulex

07/23/2018, 9:19 PM
Yes... buh this warnings comes from onCreateView : inflater onSavedInstance: bundle PS: i just updated kotlin plugin and support library
r

rook

07/23/2018, 9:24 PM
I wouldn’t be able to check myself without actually seeing your code, but I would investigate the objects you think you’re inheriting if I were you to make sure you’re calling what you think you are.
p

paulex

07/23/2018, 11:02 PM
I had to manually go to all my files to fit it. My initial implementation of those methods were like
Copy code
override fun onSavedInstance(outState:Bundle?)
After updating, it appeared that the parent class is now
Copy code
public void onSavedInstance(@NonNull outState:Bundle)
Hence kotlin complains that I haven't overriden the proper method e.g overrides nothing Now imagine going to about 20files to fix this
g

gildor

07/23/2018, 11:39 PM
Nothing buggy there and this is not because of Kotlin Plugin, looks that you updated Android support library. Support library annotated some methods with NonNull/Nullable annotation, so Kotlin now concider them as non-nullable/nullable types, not like platform types
👍 3
6 Views