HarmonyOS Cannot read property setMissionContinueState of undefined
Error message:Cannot read property setMissionContinueState of undefined
SourceCode:
context.setMissionContinueState(activeState).then(() => {
Stacktrace:
at setMissionContinueActive (libgeekapp/src/main/ets/utils/utils/WindowUtil.ets:91:5)
at aboutToAppear (libgeekapp/src/main/ets/index/IndexPage.ets:23:5)
at jump (libgeekapp/src/main/ets/splash/pages/SplashPage.ets:326:5)
at anonymous (libgeekapp/src/main/ets/splash/pages/SplashPage.ets:181:15)
}
堆栈跳转中在har中调用。
const context = (getContext(this) as common.UIAbilityContext);
context 提示undefined。
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS代码报错 cannot read property aboutToRender of undefined
1696浏览 • 1回复 待解决
HarmonyOS 调试报错TypeError:Cannot read property xxx of undefined
3382浏览 • 1回复 待解决
Cannot read property mediaUris of undefined怎么回事啊?
1654浏览 • 1回复 待解决
HarmonyOS Cannot set property when setter is undefined
1196浏览 • 1回复 待解决
升级RN到4.1.0.300版本之后运行报错Error message:Cannot read property isDebugModeEnabled of undefined
2189浏览 • 1回复 待解决
项目编译报错TypeError: Cannot read properties of undefined (reading 'newFileToResourceList')
3052浏览 • 1回复 待解决
升级IDE后编译报错:hvigor ERROR: Error: TypeError, Cannot read properties of undefined (reading 'getParameter
2493浏览 • 1回复 待解决
duplicate @Provide property with name userInfo.
2801浏览 • 1回复 待解决
HarmonyOS List提示undefined
683浏览 • 1回复 待解决
HarmonyOS Cannot find name 'ESObject'
1392浏览 • 1回复 待解决
HarmonyOS READ_IMAGEVIDEO权限问题
1583浏览 • 1回复 待解决
启动UIAbility时报“must have required property 'startWindowIcon'”错误
2831浏览 • 1回复 待解决
HarmonyOS UIAbilityContext.openLink 为 undefined
960浏览 • 1回复 待解决
HarmonyOS Object is possibly 'undefined'. <ArkTSCheck>报错
1618浏览 • 1回复 待解决
HarmonyOS ohos.permission.READ_MEDIA权限废弃问题
1246浏览 • 1回复 待解决
HarmonyOS创建前置广角相机返回undefined
1031浏览 • 1回复 待解决
HarmonyOS SourceTool.xxx值为undefined
1022浏览 • 1回复 待解决
HarmonyOS CustomDialog中的CustomDialogController 为undefined
1410浏览 • 1回复 待解决
报错Property 'pushUrl' does not exist on type 'typeof router'.
5117浏览 • 1回复 待解决
getContext 提示错误,Cannot find name 'getContext'
2165浏览 • 1回复 待解决
HSP包的context需要调用createModuleContext(‘包名’)才能获取。
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-inner-app-context-V5
因为开启了多个navigation栈导致的。