…odels shouldn’t know anything about Android. This improves testability, leak safety and modularity. A general rule of thumb is to make sure there are no
android.* imports in your ViewModels (with exceptions like
android.arch.*). The same applies to presenters.
It is of a note that Instant Apps might require adding extra ProGuard rules to your project. When working with Instant Apps, ProGuard is not smart enough to detect that some classes and methods are used between different feature modules. As a result, it strips out a lot of necessary code. So when you see something similar to the exception below,