HarmonyOS bundleManager.getProfileByAbilitySync接口报错17700024
实际在module.json5中存在此值:
try {
let data = bundleManager.getProfileByAbilitySync('face', 'MainAbility','hwc-theme');
hilog.info(0x0000, 'testTag', 'getProfileByAbilitySync successfully. Data: %{public}s', JSON.stringify(data));
} catch (err) {
let message = (err as BusinessError).message;
hilog.error(0x0000, 'testTag', 'getProfileByAbilitySync failed. Cause: %{public}s', message);
}
module.json5中内容:
"abilities": [
{
"name": "MainAbility",
"srcEntry": "./ets/ability/MainAbility.ets",
"description": "$string:MainAbility_desc",
"icon": "$media:tiger",
"label": "$string:MainAbility_label",
"startWindowIcon": "$media:startIcon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"metadata": [
{
"name": "theme",
"value": "Theme.Emui.NoActionBar"
}
],
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
},
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS bundleManager.getProfileByAbility一直报错17700024
1013浏览 • 1回复 待解决
bundleManager.isApplicationEnabledSync接口报错17700001,如何处理
2470浏览 • 1回复 待解决
HarmonyOS bundleManager.queryAbilityInfo一直报错17700003
1184浏览 • 1回复 待解决
HarmonyOS 使用云存储接口报错报错
938浏览 • 1回复 待解决
HarmonyOS getaddrinfo接口调用报错
1024浏览 • 1回复 待解决
HarmonyOS bundleManager.canOpenLink一直返回false
1514浏览 • 1回复 待解决
HarmonyOS 内购接口调用报错
1139浏览 • 1回复 待解决
HarmonyOS 调用屏幕截图接口报错801
1618浏览 • 1回复 待解决
HarmonyOS 在ArkTS中使用bundleManager中的getBundleInfoSync和getBundleInfoForSelf接口时,获取不到FAMode模型配置的metadata信息
735浏览 • 1回复 待解决
HarmonyOS bundleManager.getBundleInfoForSelfSync获取的label和icon无效
916浏览 • 1回复 待解决
HarmonyOS 接口params传数组接口报错500 Content-Type应该怎么传
966浏览 • 1回复 待解决
HarmonyOS手机模拟器OpenSLES接口采集音频报错
1601浏览 • 1回复 待解决
上传文件接口报错 ,该怎么处理啊?
1849浏览 • 1回复 待解决
调用请求通知notificationManager.requestEnableNotification接口,报错17700001
3221浏览 • 1回复 待解决
调用Ability相关接口时报错startManageTestService failed: {“code”:16000002}
2920浏览 • 1回复 待解决
upload 接口报错误码17, http protocol error
3046浏览 • 2回复 待解决
HarmonyOS 使用rcp.get接口绕开自签名证书报错1007900004
855浏览 • 1回复 待解决
HarmonyOS taskpool.SequenceRunner执行task任务,在task中调用接口报错
1472浏览 • 1回复 待解决
#鸿蒙通关秘籍#如何在页面中拿到bundleManager获取的应用名并且显示?
808浏览 • 1回复 待解决
napi方法 arkts调用c++接口时,报错Hardware vsync is not available
2119浏览 • 1回复 待解决
HarmonyOS 调用蓝牙接口access.enableBluetooth()报错 2900099, errMessage: BussinessError 2900099: Operation failed
1417浏览 • 1回复 待解决
HarmonyOS 使用自定义扫码customScan,进入后台后调用stop接口报错1000500001
856浏览 • 1回复 待解决
需要配置metadata中resource中的内容才可以,参考: