Closed lirik16 closed 5 years ago
@BenSchwab FYI
I've also just hit this. The following is a less 'keep everything' Proguard rule:
-keepnames class * implements com.airbnb.mvrx.MvRxViewModelFactory
We also realized a R8 issue yesterday. App crashes on startup. Out stacktrace looks more like the one in the old issue. 🤔
@tasomaniac I'm using R8 too. Try these: https://github.com/chrisbanes/tivi/blob/master/app/proguard-rules.pro#L137
In the version 0.7.2, I've got a crash with enabled Proguard
Caused by: java.lang.IllegalArgumentException: c takes dependencies other than initialState. It must have companion object implementing MvRxViewModelFactory with a create method returning a non-null ViewModel.
It looks like the problem in the MvRxViewModelProvider.createViewModel because Proguard obfuscates Companion object.-keep class * implements com.airbnb.mvrx.MvRxViewModelFactory { *; }
works for me to fix the problem.