c5454
c5454
  • 发布:2024-11-21 11:53
  • 更新:2024-12-06 10:37
  • 阅读:297

鸿蒙 Error message:Cannot read property create of undefined

分类:uni-app

Device info:emulator
Build info:emulator 5.0.0.102(SP1DEVC00E102R4P11log)
Fingerprint:947cfeb45bf8d97949c05d0b207e5f854afbd16912fade3cb3a26d57c10b8223
Module name:sxh.88.huawei
Version:1.0.0
VersionCode:1000000
PreInstalled:No
Foreground:Yes
Pid:18746
Uid:20020040
Reason:TypeError
Error name:TypeError
Error message:Cannot read property create of undefined
Stacktrace:
at Runtime (oh_modules/.ohpm/@dcloudio uni-app-runtime@2.3.11/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:316:1)
at anonymous (oh_modules/.ohpm/@dcloudio uni-app-runtime@2.3.11/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:730:1)
at emit (oh_modules/.ohpm/@dcloudio uni-app-runtime@2.3.11/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:61:1)
at onControllerAttached (oh_modules/.ohpm/@dcloudio uni-app-runtime@2.3.11/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:1809:1)

const id = this.id = jsRuntime.create();没有这个方法
// packages/uni-mp-sdk/src/Runtime.ts
import jsRuntime from "libjsruntime.so";

2024-11-21 11:53 负责人:无 分享
已邀请:
DCloud_UNI_LXH

DCloud_UNI_LXH

使用什么版本的 DevEco?

  • c5454 (作者)

    DevEco Studio 5.0.0 Release

    Build #DS-233.14475.28.36.503910

    构建版本:5.0.3.910, built on November 1, 2024

    Runtime version: 17.0.12+1-b1087.25 amd64

    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

    Windows 11.0

    GC: G1 Young Generation, G1 Old Generation

    Memory: 4080M

    Cores: 8

    Registry:

    idea.plugins.compatible.build=IC-233.14475.28

    2024-11-22 11:21

  • DCloud_UNI_LXH

    回复 c5454: 看着是编译 so 的问题。你随便一个项目使用 hx 4.34 运行都会报这个错误?

    2024-11-22 16:18

  • DCloud_UNI_LXH

    回复 DCloud_UNI_LXH: 运行到的设备是什么?

    2024-11-22 17:21

  • c5454 (作者)

    回复 DCloud_UNI_LXH: 是的

    2024-11-23 09:37

  • c5454 (作者)

    你随便一个项目使用 hx 4.34 运行都会报这个错误?是的

    2024-11-23 09:37

  • c5454 (作者)

    运行到的设备是什么?

    DevEco Studio 的本地模拟器 x86

    2024-11-23 09:40

  • DCloud_UNI_LXH

    回复 c5454: 有没有 arm 的设备,跑一下模拟器。或者使用真机

    2024-11-23 16:49

  • c5454 (作者)

    回复 DCloud_UNI_LXH: 没有设备

    2024-11-24 13:28

  • DCloud_UNI_LXH

    回复 c5454: 4.31 之后,jsvm 不再支持 x86 的模拟器:文档

    2024-11-25 14:37

  • c5454 (作者)

    回复 DCloud_UNI_LXH: 那就是只能是真机测试了

    2024-11-25 16:10

c5454

c5454 (作者) - uni-app 使用者

DevEco Studio 5.0.0 Release
Build #DS-233.14475.28.36.503910
构建版本:5.0.3.910, built on November 1, 2024
Runtime version: 17.0.12+1-b1087.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4080M
Cores: 8
Registry:
idea.plugins.compatible.build=IC-233.14475.28

简单simple

简单simple

您好,请问这个问题解决了吗?什么原因导致的,我也碰到这个问题了

Device info:emulator
Build info:emulator 5.0.0.102(SP1DEVC00E102R4P11log)
Fingerprint:9c133fcecd655f0e6c09080333a09f966cb9c2d788511db59c35da46585d73a6
Module name:erp.abcsale.cn
Version:1.0.0
VersionCode:1000000
PreInstalled:No
Foreground:Yes
Pid:11546
Uid:20020040
Reason:TypeError
Error name:TypeError
Error message:Cannot read property create of undefined
Stacktrace:
at Runtime (oh_modules/.ohpm/@dcloudio+uni-app-runtime@onjt5cnkmpxv8bm+y1oo6mnpqjw8oa6bpkmtp8h3hxs=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:318:1)
at anonymous (oh_modules/.ohpm/@dcloudio+uni-app-runtime@onjt5cnkmpxv8bm+y1oo6mnpqjw8oa6bpkmtp8h3hxs=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:732:1)
at emit (oh_modules/.ohpm/@dcloudio+uni-app-runtime@onjt5cnkmpxv8bm+y1oo6mnpqjw8oa6bpkmtp8h3hxs=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:61:1)
at onControllerAttached (oh_modules/.ohpm/@dcloudio+uni-app-runtime@onjt5cnkmpxv8bm+y1oo6mnpqjw8oa6bpkmtp8h3hxs=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/sdk.js:1867:1)

要回复问题请先登录注册