英文:
ml-kit - barcode-scanning android - Google code scanner
问题
我正在使用Google代码扫描器 Android MLKit 进行条形码扫描。我正在使用以下依赖项。我想要使用捆绑模型,以便在应用程序启动时不占用初始化时间。是否有一种方法可以使用捆绑版本的模型:
请查看我用于此目的的以下依赖项:
implementation 'com.google.android.gms:play-services-code-scanner:16.0.0'
AndroidManifest:
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode_ui"/>
当我使用上述依赖项时,在下载模型期间,我看到以下异常:
等待条形码 UI 模块下载完成。
是否有一种方法可以使用捆绑版本的模型,以便我无需等待条形码 UI 模块下载完成。请帮助我解决这个问题。
提前感谢。
英文:
I am using Google code scanner Android MLKit for Barcode scanning. I am using below dependencies. I want the use bundled model so that initialisation time is not taken when app is launched. Is there a way can I use bundled version of model :
Please find below dependencies I used for this :
implementation 'com.google.android.gms:play-services-code-scanner:16.0.0'
AndroidManifest:
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode_ui"/>
When I used the above dependencies , I see below exception during downloading the model:
Waiting for the Barcode UI module to be downloaded.
Is there a way can I use bundled version of model so that I need not wait for Barcode UI module to be downloaded. Please help me regarding this
Thanks in Adavance.
答案1
得分: 1
这是什么:
依赖项 {
// ...
// 使用此依赖项将模型与您的应用捆绑在一起
实施 'com.google.mlkit:barcode-scanning:17.1.0'
}
找到位置:https://developers.google.com/ml-kit/vision/barcode-scanning/android
英文:
What about this:
dependencies {
// ...
// Use this dependency to bundle the model with your app
implementation 'com.google.mlkit:barcode-scanning:17.1.0'
}
Found at: https://developers.google.com/ml-kit/vision/barcode-scanning/android
答案2
得分: 0
根据此链接:https://developers.google.com/ml-kit/tips/installation-path,Google Play服务的代码扫描器仅以独立方式提供。 (它由Google Play服务下载,似乎有点不太可靠,老实说)
如果您想要捆绑模型,似乎必须使用完整的ML Kit版本 com.google.mlkit:barcode-scanning:17.2.0
,就像SudoKoach的回答中所示。
英文:
According to this link: https://developers.google.com/ml-kit/tips/installation-path Google play services code scanner is only available unbundled. (It is downloaded by google play services and seems to be a bit unreliable tbh)
If you want a bundled model it seems you have to use the full ML Kit version 'com.google.mlkit:barcode-scanning:17.2.0'
as in SudoKoach's answer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论