1

I am trying to use android ML Kit text recognition library for the text recognition but on running I am getting error and no text is returned. Error:

W/TextNativeHandle: Native handle not yet available. Reverting to no-op handle.
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0
E/Vision: Error loading optional module com.google.android.gms.vision.ocr: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.

I have imported library in build.gradle as :

    implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.1'

Also I have added below code in android manifest file:

        <meta-data
        android:name="com.google.mlkit.vision.DEPENDENCIES"
        android:value="ocr" />

How can I use ML Kit text recognition then?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Coder
  • 129
  • 7
  • Can you please check if there's a message above the error saying something like "Google Play services out of date"? – Hoi Sep 01 '20 at 14:11
  • Have you been able to resolve? Or still running into this? – Chrisito Sep 11 '20 at 18:05
  • I am still running onto this. Also Google Play Services is not out of date, I have checked this – Coder Sep 13 '20 at 20:21
  • Sorry for late response, if you are still running into this, could you file a bug at our https://b.corp.google.com/issues/new?component=897785&template=1457144 with link to a bug report taken on the affected device? Instructions are in the bug template. Thanks. – Chrisito Sep 25 '20 at 18:12

1 Answers1

0

The underlying text recognition library in ML Kit is in an "optional module" that has to be downloaded by Google Play Services; until that has happened, you get the error message you described. There seems to be something that prevents the optional module from being downloaded – it could be network issues, or insufficient disk space. Unfortunately, it is hard to further debug that issue remotely.