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

Akram

06/28/2020, 6:29 PM
hello i'm trying to call the copy function by passing the
KProperty
it is working well in debugging , the problem is with r8 obfuscation i'm getting app crashing is there other way to do this ? here is my code
a

Adam Powell

06/28/2020, 6:36 PM
After r8 obfuscation the method isn't called
copy
at runtime anymore so it can't be found. Assuming you are trying to do this to facilitate deep copies of nested immutable data classes, you might have a look at arrow optics instead, which uses code generation instead of reflection: https://arrow-kt.io/docs/0.10/optics/lens/, and the folks over in #arrow would probably be quite helpful
a

Akram

06/28/2020, 6:40 PM
Thank You @Adam Powell i'll take a look into it