HMS-Core / hms-ml-demo

HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
https://developer.huawei.com/consumer/en/hms/huawei-mlkit?ha_source=hms1
Apache License 2.0
357 stars 120 forks source link

HMS ML Demo - Module text, urlList is null #13

Closed vellrya closed 4 years ago

vellrya commented 4 years ago

Hello, when I try to download chinese model for offline translation in module text, I get the following error in logcat:

2020-07-20 23:49:52.142 581-1009/com.mlkit.sample.text E/MLLocalModelManager: queryModelInfo urlList is null!
2020-07-20 23:49:52.155 581-581/com.mlkit.sample.text E/LocalTranslateActivity: downloadModel failed: Failed to obtain model info

and on device toast: "DownloadModel Failed"

Same error appear, when I add ML translate dependencies to my own separate project. Could you please check this issue? Downloading of english model, for example, completed successfully.

Mike-mei commented 4 years ago

Hi, vellrya, sorry for bothering you about the issue, but the information you provided is limited, please tell us more information:

  1. The version of HMS Core;
  2. The phone model which the demo runned on;
  3. How often this issue arises?
  4. Can you provide more log, begined with test starting, or share the demo?

Thanks.

vellrya commented 4 years ago

Hello, I downloaded hms-ml-demo-master.zip from this repository and run MLKit-Sample -> module-text. On home screen of sample app I select "Translation" -> "offline translation", select "Chinese" and press "Download model" button. I take a video of this process: https://dropmefiles.com/MShBM

Here the full logcat from app start to error appear: https://pastebin.com/q1j5ghDf Error in log at 2020-07-21 10:17:18.051.

Mike-mei commented 4 years ago

To solve this issue, you should

  1. Register as a developer and create an app in AppGallery Connect
  2. Obtain the agconnect-services.json file from Huawei Developers
  3. Replace the sample-agconnect-services.json file in the project.