OrangeShopping编译报错

Signed-off-by: yeyedeshen <yangxin181@huawei.com>
This commit is contained in:
yeyedeshen 2024-09-03 16:07:54 +08:00
parent 04af7e90df
commit 976e86ad11
6 changed files with 32 additions and 19 deletions

View File

@ -229,9 +229,9 @@ shoppingCartData)。[源码参考](feature/emitter/src/main/ets/components/featu
1.本示例仅支持标准系统上运行支持设备RK3568。
2.本示例已适配API10版本SDKSDK版本号(API Version 10 Release),镜像版本号(4.0 Release)。
2.本示例已适配API11版本SDKSDK版本号(API Version 11 Release),镜像版本号(4.1 Release)。
3.本示例需要使用DevEco Studio 版本号(4.0 Release)及以上版本才可编译运行。
3.本示例需要使用DevEco Studio 版本号(4.1 Release)及以上版本才可编译运行。
4.本示例需要使用系统权限的接口。使用Full SDK时需要手动从镜像站点获取并在DevEco
Studio中替换具体操作可参考[替换指南](https://docs.openharmony.cn/pages/v3.2/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md/)。

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -19,14 +19,12 @@
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": 10,
"compatibleSdkVersion": 10,
"targetSdkVersion": 10,
"compileSdkVersion": 11,
"compatibleSdkVersion": 11,
"runtimeOS": "OpenHarmony"
}
],
"signingConfigs": [
]
"signingConfigs": []
},
"modules": [
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -56,9 +56,9 @@ export default class WorkAbility extends WorkSchedulerExtensionAbility {
];
logger.info(TAG, `publishNotification actionButtons= ${JSON.stringify(actionButtons)}`);
try {
let notificationContent = notificationContentUtil.initBasicNotificationContent(basicContent);
let notificationContent = notificationContentUtil.initBasicNotificationContent(basicContent) as notification.NotificationContent;
logger.info(TAG, `publishNotification notificationContent= ${JSON.stringify(notificationContent)}`);
let notificationRequest = notificationRequestUtil.initButtonNotificationRequest(notificationContent, actionButtons);
let notificationRequest = notificationRequestUtil.initButtonNotificationRequest(notificationContent, actionButtons) as notification.NotificationRequest;
logger.info(TAG, `publishNotification notificationRequest= ${JSON.stringify(notificationRequest)}`);
notificationUtil.publishNotification(notificationRequest, NOTIFICATION_ID);
} catch (error) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -17,7 +17,7 @@
"module": {
"name": "entry",
"type": "entry",
"srcEntrance": "./ets/Application/MyAbilityStage.ets",
"srcEntry": "./ets/Application/MyAbilityStage.ets",
"description": "$string:entry_descc",
"mainElement": "MainAbility",
"deviceTypes": [
@ -31,7 +31,7 @@
"abilities": [
{
"name": "MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ets",
"srcEntry": "./ets/MainAbility/MainAbility.ets",
"description": "$string:MainAbility_descc",
"icon": "$media:icon",
"label": "$string:MainAbility_name",
@ -54,7 +54,7 @@
"extensionAbilities": [
{
"name": "WorkAbility",
"srcEntrance": "./ets/WorkAbility/WorkAbility.ets",
"srcEntry": "./ets/WorkAbility/WorkAbility.ets",
"label": "$string:WorkSchedulerExtensionAbility_label",
"description": "$string:WorkSchedulerExtensionAbility_desc",
"type": "workScheduler",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -58,7 +58,7 @@ export class EmitterClass {
let addGoodDataId: EventsId = new EventsId(EmitterConst.ADD_EVENT_ID);
// 以持久化方式订阅购物车添加事件并接收事件回调
emitter.off(EmitterConst.ADD_EVENT_ID);
emitter.on(addGoodDataId, (eventData: EventsData) => {
emitter.on(addGoodDataId, (eventData) => {
callback(eventData);
});
}

View File

@ -1,6 +1,21 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"hvigorVersion": "3.0.9",
"hvigorVersion": "4.1.2",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "3.0.9"
"@ohos/hvigor-ohos-plugin": "4.1.2"
}
}