App has ML Kit functionality (translation). I'm trying to reduce the app size by introducing a dynamic module feature, on demand loading.
Following this guide Added 'com.google.mlkit:playstore-dynamic-feature-support:16.0.0-beta1' to base apk's build.gradle
com.google.mlkit:translate:16.1.2 in feature module build.gradle,
everything compiles and tries to run on emulator, but unfortunately crashes on app start with log
java.lang.RuntimeException: Unable to get provider com.google.mlkit.common.internal.MlKitInitProvider: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.android.gms.internal.mlkit_translate.zzxa]>{0, type=0, deps=[Dependency{anInterface=class com.google.mlkit.common.sdkinternal.SharedPrefManager, type=required, injection=direct}, Dependency{anInterface=class com.google.android.gms.internal.mlkit_translate.zzwx, type=required, injection=direct}]}: class com.google.mlkit.common.sdkinternal.SharedPrefManager
Caused by: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.android.gms.internal.mlkit_translate.zzxa]>{0, type=0, deps=[Dependency{anInterface=class com.google.mlkit.common.sdkinternal.SharedPrefManager, type=required, injection=direct}, Dependency{anInterface=class com.google.android.gms.internal.mlkit_translate.zzwx, type=required, injection=direct}]}: class com.google.mlkit.common.sdkinternal.SharedPrefManager
Which kind of does not make sense. Because I've added playstore-dynamic-feature-support.