Can't run app on Huawei lite wearable (GT2 PRO): API error when installing on device

318 Views Asked by At

I am trying to write an app for my GT2 Pro but when I try to install my app with Huawei DevEco Assistant, it gives me the following error:

Installation failed: 47. Invalid value entered for app.apiVersion


Here is the steps I did:

  1. I created a [Lite] JS project.
  2. I signed the app without any changes on project.
  3. I built a signed hap and copied it to the haps directory on the phone.
  4. I tried to install app via DevEco Assistant.

DevEco Studio details:

DevEco Studio 2.1.0.501 with api 4-5

DevEco Studio 3.1.0.100 with api 4-7

1

There are 1 best solutions below

1
On

I assume you followed the process for debugging your app on GT2 Pro at https://developer.huawei.com/consumer/en/doc/distribution/app/agc-help-harmonyos-debugapp-manual-0000001177608893, especially on Sports watches section.

What's the software version in the GT2 Pro? If it has been upgraded to the latest version, you need to check the build.gradle file and ensure the SDK version is correct. For the lite-wearable device, the compatible API 4 and target API 5 are recommended. You may set API 4 for both or API 3 and API 4, depending on HarmonyOS version in your device. You also need to make sure the API configuration is consistent in the config.json file if the "apiVersion" is configured. In addition, you should use the official released DevEco Studio such as version 3.0 or version 2.1 for your app development and debugging.

enter image description here