googlesamples / googlesamples/mlkit

Text Recognition & Translation getClient() Error in dynamic feature module

Open
#330 7 comments 1 reaction 1 assignee Claimed by @stunningdimension22 View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

I'm working on a feature utilizing Ml Kit text recognition and Translation library. For app size concern, I moved the implementation to a dynamic delivered module, and running `TextRecognition.getClient()` start to give the following error:
```
Attempt to invoke virtual method 'com.google.mlkit.vision.text.TextRecognizer com.google.mlkit.vision.text.internal.zzk.zza()' on a null object reference
```
The same implementation is working properly on the regular module. And I have already included `implementation 'com.google.mlkit:playstore-dynamic-feature-support:16.0.0-beta1` in my base apk. Can someone help to figure out what I'm missing? Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.