简体   繁体   English

无法在 Huawei lite wearable (GT2 PRO) 上运行应用程序:在设备上安装时出现 API 错误

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

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:我正在尝试为我的 GT2 Pro 编写一个应用程序,但是当我尝试使用 Huawei DevEco Assistant 安装我的应用程序时,出现以下错误:

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


Here is the steps I did:这是我执行的步骤:

  1. I created a [Lite] JS project.我创建了一个 [Lite] JS 项目。
  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.我构建了一个已签名的 hap,并将其复制到手机上的 haps 目录中。
  4. I tried to install app via DevEco Assistant.我尝试通过 DevEco Assistant 安装应用程序。

DevEco Studio details: DevEco Studio 详细信息:

DevEco Studio 2.1.0.501 with api 4-5

DevEco Studio 3.1.0.100 with api 4-7

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.我假设您在https://developer.huawei.com/consumer/en/doc/distribution/app/agc-help-harmonyos-debugapp-manual-0000001177608893遵循了在 GT2 Pro 上调试您的应用程序的过程,尤其是在运动手表上部分。

What's the software version in the GT2 Pro? 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.如果已经升级到最新版本,需要查看build.gradle文件,确保SDK版本正确。 For the lite-wearable device, the compatible API 4 and target API 5 are recommended.对于轻穿戴设备,推荐兼容API 4 和target API 5。 You may set API 4 for both or API 3 and API 4, depending on HarmonyOS version in your device.您可以为两者设置 API 4 或 API 3 和 API 4,具体取决于您设备中的 HarmonyOS 版本。 You also need to make sure the API configuration is consistent in the config.json file if the "apiVersion" is configured.如果配置了“apiVersion”,还需要确保config.json文件中的API配置一致。 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.另外,您应该使用官方发布的3.0或2.1版本的DevEco Studio来进行您的应用程序开发和调试。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 华为团队账号操作角色无法在华为应用库上传应用 - Huawei Team account operation role can't upload application in huawei app gallery 应用程序被杀死或在后台时不会出现华为 PushKit 通知 - Huawei PushKit Notifications doesn't appear when app is killed or in background 如何使用Huawei Push Kit API向华为设备发送推送? - How to send push to Huawei device using Huawei Push Kit API? 应用审核测试期间无法访问华为Site Kit - Huawei Site Kit can't be access during app review testing 在华为快应用上请求原生广告时出现“字符串错误” - “Stringernal error” when requesting a Native Ad on Huawei Quick-App 我无法从华为 p40 系列设备获取 Firebase 令牌 - I can't get Firebase token from Huawei p40 series device 在华为Mate 30 Pro上测试集成HMS Health Kit的应用程序时,为什么无法获取步数? - When I test an app integrated with the HMS Health Kit on my Huawei Mate 30 Pro, why cannot I obtain the number of steps? 我可以在非华为设备上启动华为地图SDK吗? - Can I launch Huawei Map SDK on non-Huawei device? 当应用程序在华为设备上被破坏时,本地通知不起作用 [Xamarin.Android] - Local notifications not working when app is breaked on Huawei device [Xamarin.Android] 华为设备不会在 react-native-share 中返回承诺成功或错误 - Huawei Device doesn't return promise success or error in react-native-share
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM