OpenHarmony 4.1版本应用升级到5.0版本问题记录及解决方案
目录
1. ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/entry/src/main/ets/Application/MyAbilityStage.ts:33:9 No overload matches this call. Overload 1 of 4, '(slot: NotificationSlot): Promise', gave the following error. Type 'SlotType.SOCIAL_COMMUNICATION' is not assignable to type 'SlotType'. Overload 2 of 4, '(type: SlotType): Promise', gave the following error. Argument of type '{ type: notification.SlotType; level: notification.SlotLevel; desc: string; lockscreenVisibility: number; }' is not assignable to parameter of type 'SlotType'.
2 ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/entry/src/main/ets/util/StringFormatUtil.ets:40:27 This API is used only in FA Mode, but the current Mode is Stage.
3 ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/feature/call/src/main/ets/missedcall/MissedCallNotifier.ets:189:9 Type 'import("F:\\huawei\\openharmony\\12\\ets\\api\\@ohos.notificationManager").default.ContentType' is not assignable to type 'import("F:/huawei/openharmony/12/ets/api/@ohos.notification").default.ContentType'. Property 'NOTIFICATION_CONTENT_SYSTEM_LIVE_VIEW' is missing in type 'import("F:/huawei/openharmony/12/ets/api/@ohos.notification").default.ContentType'.
4 ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/feature/call/src/main/ets/missedcall/MissedCallNotifier.ets:199:7 Type 'SlotType.SOCIAL_COMMUNICATION' is not assignable to type 'SlotType'.
5 ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/feature/call/src/main/ets/missedcall/MissedCallNotifier.ets:280:7 Type 'import("F:/huawei/openharmony/12/ets/api/@ohos.app.ability.wantAgent").default.OperationType' is not assignable to type 'import("F:/huawei/openharmony/12/ets/api/@ohos.wantAgent").default.OperationType'.
6.ERROR: ArkTS:ERROR File: E:/Hap/applications_contacts-OpenHarmony-5.0.0-Release/feature/contact/src/main/ets/repo/DAOperation.ets:33:33 This API is used only in FA Mode, but the current Mode is Stage.