我正在尝试使用android ML Kit文本识别库进行文本识别,但在运行时遇到错误,没有返回任何文本。错误:
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.
我已经在build.gradle中导入库为:
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.1'
此外,我还在android清单文件中添加了以下代码:
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="ocr" />
那么如何使用ML Kit文本识别呢?
发布于 2020-09-14 19:54:46
ML Kit中的底层文本识别库位于Google Play Services必须下载的“可选模块”中;在此之前,您会得到您所描述的错误消息。似乎有什么东西阻止了可选模块的下载-可能是网络问题,或者磁盘空间不足。不幸的是,很难进一步远程调试这个问题。
https://stackoverflow.com/questions/63597583
复制相似问题