[英]How to solve Errors in ML Kit Text Recognition library in Android?
我正在尝试使用 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 文本识别呢?
ML Kit 中的底层文本识别库位于必须由 Google Play 服务下载的“可选模块”中; 在发生这种情况之前,您会收到您描述的错误消息。 似乎有什么东西阻止了可选模块的下载——可能是网络问题,或者磁盘空间不足。 不幸的是,很难远程进一步调试该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.