wasyl
01/28/2020, 3:27 PMjava.lang.LinkageError: Method void com.example.h72.a() overrides final method in class Lcom.example/de; (declaration of 'com.example.h72' appears in base.apk).
That’s after obfuscation with R8. The cause was we’d have the following class hierarchy:
androidx.lifecycle.ViewModel <- BaseViewModel <- SomeViewModel, and in SomeViewModel we’d have a fun clear() { } method. However, method with same name and signature appears in `androidx.lifecycle.ViewModel.java`: final void clear().
What I quite don’t understand is, why everything works without R8? I clearly see public final void clear() method in the decompiled SomeViewModel, and so feels like things should crash straight away. What happens instead, app works fine without R8 and only crashes with it. 😕 Any idea what might be the reason?Zach Kovar
01/28/2020, 5:50 PMZach Kovar
01/28/2020, 5:51 PMwasyl
01/28/2020, 7:04 PMwasyl
01/28/2020, 7:05 PMTolriq
01/28/2020, 7:27 PMZach Kovar
01/28/2020, 7:29 PMclear() which is kind of a blah fix, but at least it was a work-aroundwasyl
01/28/2020, 7:30 PM