构建安卓工程测试热更新cocos2d-jsb.js报错

  • Creator 版本:2.3

  • 目标平台: Android

  • 详细报错信息,包含调用堆栈:2020-02-24 15:57:19.317 1425-9105/? D/PowerManagerServiceInjector: wakeLock:[PARTIAL_WAKE_LOCK ‘CMWakeLock’ (uid=10216 pid=6480 ws=WorkSource{10216 com.google.android.gms})] is disabled by policy
    2020-02-24 15:57:19.328 6480-6480/? W/ChimeraUtils: Non Chimera context
    2020-02-24 15:57:19.328 6480-6480/? W/ChimeraUtils: Non Chimera context
    2020-02-24 15:57:19.336 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.341 31124-31124/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
    2020-02-24 15:57:19.356 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.362 31124-31124/? I/app_process: System.exit called, status: 0
    2020-02-24 15:57:19.362 31124-31124/? I/AndroidRuntime: VM exiting with result code 0.
    2020-02-24 15:57:19.362 31124-31140/? W/MessageQueue: Handler (android.os.Handler) {5731fbc} sending message to a Handler on a dead thread
    java.lang.IllegalStateException: Handler (android.os.Handler) {5731fbc} sending message to a Handler on a dead thread
    at android.os.MessageQueue.enqueueMessage(MessageQueue.java:551)
    at android.os.Handler.enqueueMessage(Handler.java:665)
    at android.os.Handler.sendMessageAtTime(Handler.java:630)
    at android.os.Handler.sendMessageDelayed(Handler.java:600)
    at android.os.Handler.post(Handler.java:356)
    at android.os.ResultReceiver$MyResultReceiver.send(ResultReceiver.java:57)
    at com.android.internal.os.IResultReceiver$Stub.onTransact(IResultReceiver.java:58)
    at android.os.Binder.execTransact(Binder.java:681)
    2020-02-24 15:57:19.376 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.397 737-12655/? I/chatty: uid=1041(audioserver) writer identical 1 line
    2020-02-24 15:57:19.417 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.437 31055-31103/org.cocos2d.helloworld D/NetworkSecurityConfig: No Network Security Config specified, using platform default
    2020-02-24 15:57:19.437 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.454 31055-31103/org.cocos2d.helloworld D/renderer: (616): Device caps: maxVextexTextures: 16, maxFragUniforms: 256, maxTextureUints: 16, maxVertexAttributes: 32, maxDrawBuffers: 1, maxColorAttatchments: 1
    2020-02-24 15:57:19.457 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.477 737-12655/? I/chatty: uid=1041(audioserver) writer identical 1 line
    2020-02-24 15:57:19.497 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.504 31055-31103/org.cocos2d.helloworld D/jswrapper: JS: Create unpacker 02be9e242 for 02delMVqdBD70a/HSD99FK
    2020-02-24 15:57:19.518 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.521 1425-1836/? E/WindowManager: Performed 6 layouts in a row. Skipping
    2020-02-24 15:57:19.527 1425-3223/? E/WindowManager: Performed 6 layouts in a row. Skipping
    2020-02-24 15:57:19.531 1970-1970/? D/StatusBar: disable disable2
    2020-02-24 15:57:19.533 1425-3223/? W/ActivityManager: Sending non-protected broadcast com.android.systemui.fullscreen.statechange from system 1970:com.android.systemui/1000 pkg com.android.systemui. Callers=
    2020-02-24 15:57:19.533 31055-31103/org.cocos2d.helloworld D/jswrapper: JS: Cocos Creator v2.3.0
    2020-02-24 15:57:19.535 31055-31103/org.cocos2d.helloworld D/jswrapper: JS: Create unpacker 0c757b08e for adlW0UPNxJibXLZMGjLDav
    2020-02-24 15:57:19.538 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.541 1425-1506/? I/ActivityManager: Displayed org.cocos2d.helloworld/org.cocos2dx.javascript.AppActivity: +997ms
    2020-02-24 15:57:19.541 1425-1506/? E/ANDR-PERF-JNI: com_qualcomm_qtiperformance_native_perf_io_prefetch_start
    2020-02-24 15:57:19.542 4060-4104/? D/PowerKeeper.Event: notifyActivityLaunchTime: org.cocos2d.helloworld/org.cocos2dx.javascript.AppActivity totalTime: 997
    2020-02-24 15:57:19.542 760-760/? E/ANDR-IOP: IOP HAL: Received pkg_name = org.cocos2d.helloworld pid = 31055
    2020-02-24 15:57:19.542 760-760/? E/ANDR-IOP: event data pool ran empty
    2020-02-24 15:57:19.545 1425-1506/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{c917d20 u0 org.cocos2d.helloworld/org.cocos2dx.javascript.AppActivity t10484} time:208663000
    2020-02-24 15:57:19.554 1425-3223/? D/PerfShielderService: com.android.systemui|StatusBar|302|208662390197749|175|0|5
    2020-02-24 15:57:19.555 3081-12693/? W/MiuiPerfServiceClient: interceptAndQueuing:1970|com.android.systemui|302|175|unknown|null|StatusBar|208662390197749|Slow main thread|5
    2020-02-24 15:57:19.555 1425-1506/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{c917d20 u0 org.cocos2d.helloworld/org.cocos2dx.javascript.AppActivity t10484} time:208663011
    2020-02-24 15:57:19.558 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.568 1425-1836/? I/WindowManager: Screen frozen for +993ms due to Window{9616f88 u0 RoundCorner}
    2020-02-24 15:57:19.578 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.583 31055-31103/org.cocos2d.helloworld D/jswrapper: JS: LoadScene adlW0UPNxJibXLZMGjLDav: 48.724999999999966ms
    2020-02-24 15:57:19.598 31055-31103/org.cocos2d.helloworld D/cocos2d-x: find in flash memory dirPath(/data/user/0/org.cocos2d.helloworld/files)
    2020-02-24 15:57:19.598 31055-31103/org.cocos2d.helloworld D/cocos2d-x: find in flash memory dirPath(/data/user/0/org.cocos2d.helloworld/files_temp)
    2020-02-24 15:57:19.599 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.619 737-12655/? I/chatty: uid=1041(audioserver) writer identical 1 line
    2020-02-24 15:57:19.639 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.648 31055-31103/org.cocos2d.helloworld D/jswrapper: JS: Success to load scene: db://assets/Scene/login.fire
    2020-02-24 15:57:19.659 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.798 1425-1899/? D/PowerManagerServiceInjector: wakeLock:[PARTIAL_WAKE_LOCK ‘job/com.google.android.gms.reminders/com.google/:android’ (uid=1000 pid=1425 ws=WorkSource{10216})] is disabled by policy
    2020-02-24 15:57:19.799 1425-1460/? D/PowerManagerServiceInjector: wakeLock:[PARTIAL_WAKE_LOCK 'sync/com.google.android.gms.reminders/com.google/
    ’ (uid=1000 pid=1425 ws=WorkSource{10216})] is disabled by policy
    2020-02-24 15:57:19.800 31055-31103/org.cocos2d.helloworld E/jswrapper: ERROR: Uncaught TypeError: this._am.retain is not a function, location: src/cocos2d-jsb.js:0:0
    STACK:
    [0]onLoad@src/project.js:47
    [1]anonymous@(no filename):3
    [2]anonymous@src/cocos2d-jsb.js:13857
    [3]invoke@src/cocos2d-jsb.js:13820
    [4]activateNode@src/cocos2d-jsb.js:25894
    [5]_activate@src/cocos2d-jsb.js:10101
    [6]runSceneImmediate@src/cocos2d-jsb.js:7959
    [7]anonymous@src/cocos2d-jsb.js:8039
    [8]anonymous@src/cocos2d-jsb.js:28292
    [9]anonymous@src/cocos2d-jsb.js:23451
    [10]anonymous@src/cocos2d-jsb.js:32254
    [11]fireTimeout@jsb-adapter/jsb-builtin.js:2191
    [12]tick@jsb-adapter/jsb-builtin.js:2148
    2020-02-24 15:57:19.800 31055-31103/org.cocos2d.helloworld E/jswrapper: [ERROR] (D:/software/cocoscreator2.3/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/Object.cpp, 562): Invoking function (0x70b698b980) failed!
    2020-02-24 15:57:19.800 3119-4373/? D/SyncNotificationManager: SyncStatusObserver: onStatusChanged
    2020-02-24 15:57:19.800 31055-31103/org.cocos2d.helloworld E/jswrapper: ERROR: Uncaught TypeError: this._am.retain is not a function, location: src/cocos2d-jsb.js:0:0
    STACK:
    [0]onLoad@src/project.js:47
    [1]anonymous@(no filename):3
    [2]anonymous@src/cocos2d-jsb.js:13857
    [3]invoke@src/cocos2d-jsb.js:13820
    [4]activateNode@src/cocos2d-jsb.js:25894
    [5]_activate@src/cocos2d-jsb.js:10101
    [6]runSceneImmediate@src/cocos2d-jsb.js:7959
    [7]anonymous@src/cocos2d-jsb.js:8039
    [8]anonymous@src/cocos2d-jsb.js:28292
    [9]anonymous@src/cocos2d-jsb.js:23451
    [10]anonymous@src/cocos2d-jsb.js:32254
    [11]fireTimeout@jsb-adapter/jsb-builtin.js:2191
    [12]tick@jsb-adapter/jsb-builtin.js:2148
    2020-02-24 15:57:19.800 31055-31103/org.cocos2d.helloworld E/jswrapper: [ERROR] (D:/software/cocoscreator2.3/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/Object.cpp, 562): Invoking function (0x70b698b980) failed!
    2020-02-24 15:57:19.801 737-12655/? W/StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
    2020-02-24 15:57:19.801 29866-30044/? I/CloudServiceObserver: sync status: false
    2020-02-24 15:57:19.805 31055-31103/org.cocos2d.helloworld E/jswrapper: ERROR: Uncaught TypeError: this._am.retain is not a function, location: src/cocos2d-jsb.js:0:0
    STACK:
    [0]onLoad@src/project.js:47
    [1]anonymous@(no filename):3
    [2]anonymous@src/cocos2d-jsb.js:13857
    [3]invoke@src/cocos2d-jsb.js:13820
    [4]activateNode@src/cocos2d-jsb.js:25894
    [5]_activate@src/cocos2d-jsb.js:10101
    [6]runSceneImmediate@src/cocos2d-jsb.js:7959
    [7]anonymous@src/cocos2d-jsb.js:8039
    [8]anonymous@src/cocos2d-jsb.js:28292
    [9]anonymous@src/cocos2d-jsb.js:23451
    [10]anonymous@src/cocos2d-jsb.js:32254
    [11]fireTimeout@jsb-adapter/jsb-builtin.js:2191
    [12]tick@jsb-adapter/jsb-builtin.js:2148

  • 重现方式:使用官方热更新例子中的version_generator.js生成对应的manifest文件,挂载hotUpdate脚本,编译安卓版本就报错,androidstudio的gradle版本:4.6,gradle plugin version:3.2.1,ndk版本:19.2.5345600

  • 之前哪个版本是正常的 :

  • 手机型号 :小米mix2

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:必现

  • 额外线索:

启动游戏会闪屏,还没有执行更新检测

使用官方热更新工程,导出的安卓包在执行更新完毕后会也会报错

<img src="/uploads/default/original/3X/3/e/3e35cbf771c1fe02dccc81c95d013c0b62c56687.png" width=“690” height="398"creator2.3使用官方热更新例子出现报错有哪位大佬帮忙看看问题

我也是