[LayaAir3]打包harmonyos next后,运行报错

用LayaAir3.2.7 开发的小游戏,发布HarmonyOS Next后,用DevEco打开运行时,报错
10-31 09:07:08.249   20856-2248    C03f00/ArkCompiler                                    E     [ArkRuntime Log] TypeError: Cannot read property getContext of undefined
10-31 09:07:08.249   20856-2248    C03f00/ArkCompiler                                    E     [ArkRuntime Log]     at func_main_0 (entry|entry|1.0.0|src/main/ets/MainAbility/MainAbility.ts:9:52)
10-31 09:07:08.249   20856-2248    C01304/Simulator                                      E     [Simulator Log]Error name:TypeError
10-31 09:07:08.249   20856-2248    C01304/Simulator                                      E     [Simulator Log]Error message:Cannot read property getContext of undefined
10-31 09:07:08.249   20856-2248    C01304/Simulator                                      E     [Simulator Log]Stacktrace:
10-31 09:07:08.249   20856-2248    C01304/Simulator                                      E     [Simulator Log]    at func_main_0 entry (entry/src/main/ets/MainAbility/MainAbility.ts:10:52)
 
定位到MainAbility.ts:10:52
这一句报错
const nativeAppLifecycle: laya.CPPFunctions = laya.getContext(ContextType.APP_LIFECYCLE);
已邀请:

要回复问题请先

商务合作
商务合作