android / android/app-bundle-samples

dynamic-feature mlkit translate

Open
#114 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
735
Forks
348
PR merge metrics
No merged PRs in 30d

Description

Hello, I will dynamically download the module of mlkit translate and throw this exception

base module
```
implementation 'com.google.mlkit:playstore-dynamic-feature-support:16.0.0-beta1'
```

crash
```
AndroidRuntime: FATAL EXCEPTION: main
Process: com.zaz.translate, PID: 15291
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.zzwx]>{0, type=0, deps=[Dependency{anInterface=class android.content.Context, type=required, injection=direct}, Dependency{anInterface=class com.google.mlkit.common.sdkinternal.SharedPrefManager, type=required, injection=direct}, Dependency{anInterface=interface com.google.android.gms.internal.mlkit_translate.zzww, type=required, injection=direct}]}: class com.google.mlkit.common.sdkinternal.SharedPrefManager
at android.app.ActivityThread.installProvider(ActivityThread.java:7250)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6785)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6702)
at android.app.ActivityThread.access$1400(ActivityThread.java:236)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1962)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:7684)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:507)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
```

Contributor guide

Open the contributing guide

Research direction

Start with the dynamic-feature setup and the base dependency `com.google.mlkit:playstore-dynamic-feature-support:16.0.0-beta1`; reproduce the crash and trace the `MlKitInitProvider` and `MissingDependencyException` path. The issue names no source files or tests, so done means the dynamically downloaded ML Kit Translate module initializes without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.