[应用双开] APP使用小米的应用双开功能,不能同时打开两个。

对一个空项目A1使用应用双开功能,产生一个新的图标A2.
打开A1,正常运行,回到桌面打开A2,此时A2会打开,然后黑屏,然后闪退。

creator version : 2.4.4

部分闪退日志如下。

2021-05-20 11:24:02.505 27300-27300/? E/DeviceLevelUtils: isLowGpuDevice:2
2021-05-20 11:24:02.640 25506-25506/? E/rg.cocos2d.dem: Unknown bits set in runtime_flags: 0x8000
2021-05-20 11:24:02.669 2126-9429/? E/LauncherAnimationRunner: onAnimationStart
2021-05-20 11:24:02.669 2126-9429/? E/LauncherAnimationRunner: onAnimationStart: mode=0 taskId=99900043
2021-05-20 11:24:02.669 2126-9429/? E/LauncherAnimationRunner: onAnimationStart: mode=1 taskId=1
2021-05-20 11:24:02.669 2126-2126/? E/QuickstepTransition: startIconLaunchAnimator:launcherClosing=true iconLoc=Rect(848, 462 - 1007, 621)
2021-05-20 11:24:02.669 2126-2126/? E/QuickstepTransition: startOpeningWindowAnimators:rotation0IconLoc=Rect(848, 462 - 1007, 621)
2021-05-20 11:24:02.670 2126-2126/? E/ClipAnimationHelper: updateSourceStack mSourceInsets=Rect(0, 0 - 130, 0), mSourceStackBounds=Rect(0, 0 - 2400, 1080), mHomeStackBounds=Rect(0, 0 - 1080, 2400)
2021-05-20 11:24:02.670 2126-2126/? E/ClipAnimationHelper: updateTargetRect mSourceRect=RectF(0.0, 0.0, 2270.0, 1021.5) mTargetRect=RectF(0.0, 0.0, 2400.0, 1080.0) mSourceWindowClipInsets=RectF(0.0, 0.0, 130.0, 58.5) mHomeStackBounds=Rect(0, 0 - 1080, 2400) targetRect=Rect(0, 0 - 2400, 1080)
2021-05-20 11:24:02.672 2126-2126/? E/QuickstepTransition: startLauncherContentAnimator:isAppOpening=true
2021-05-20 11:24:02.718 27300-27300/? E/DeviceLevelUtils: isLowGpuDevice:2
2021-05-20 11:24:02.721 25506-25506/org.cocos2d.demo E/libc: Access denied finding property “ro.vendor.df.effect.conflict”
2021-05-20 11:24:02.852 27300-27300/? E/DeviceLevelUtils: isLowGpuDevice:2
2021-05-20 11:24:02.858 807-807/? E/HfManager: batchSensor=1
2021-05-20 11:24:02.867 1348-3377/? E/WindowManager: App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
2021-05-20 11:24:02.906 25506-25537/org.cocos2d.demo E/gralloc: Arm Module v1.0
2021-05-20 11:24:02.906 25506-25537/org.cocos2d.demo E/ion: ioctl c0044901 failed with code -1: Invalid argument
2021-05-20 11:24:02.908 25506-25569/org.cocos2d.demo E/jswrapper: Starting inspector on 0.0.0.0:6086 failed: address already in use
2021-05-20 11:24:02.908 25506-25569/org.cocos2d.demo E/jswrapper: [FATAL ERROR]: Port [:6086] is occupied by other processes, try to kill the previous debug process or change the port number in jsb_enable_debugger.

--------- beginning of crash

2021-05-20 11:24:02.908 25506-25569/org.cocos2d.demo A/libc: E:/matchgame/iphone/CocosCreator/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc:433: bool node::inspector::InspectorSocketServer::Start(): assertion “false” failed
2021-05-20 11:24:02.908 25506-25569/org.cocos2d.demo A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 25569 (GLThread 23162), pid 25506 (rg.cocos2d.demo)
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: Build fingerprint: ‘Redmi/cezanne/cezanne:10/QP1A.190711.020/V12.0.21.0.QJNCNXM:user/release-keys’
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: Revision: ‘0’
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: ABI: ‘arm64’
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: Timestamp: 2021-05-20 11:24:02+0800
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: pid: 25506, tid: 25569, name: GLThread 23162 >>> org.cocos2d.demo <<<
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: uid: 99910433
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: Abort message: ‘E:/matchgame/iphone/CocosCreator/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc:433: bool node::inspector::InspectorSocketServer::Start(): assertion “false” failed’
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x0 0000000000000000 x1 00000000000063e1 x2 0000000000000006 x3 00000073e4cb5fb0
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000020
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x8 00000000000000f0 x9 00000074f24e5520 x10 0000000000000000 x11 0000000000000001
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x12 0000000000000018 x13 0000000060a5d652 x14 0035d4b398f77df0 x15 0000509969d8b22c
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x16 00000074f25b28c8 x17 00000074f258fce0 x18 00000073e21c0000 x19 00000000000063a2
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x20 00000000000063e1 x21 00000000ffffffff x22 000063a2000063c7 x23 00000073e4cb6dd8
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x24 00000073e4cb6d50 x25 00000073e4cb6d50 x26 00000073e4cb7010 x27 000000740211e018
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: x28 00000073e4cb7018 x29 00000073e4cb6050
2021-05-20 11:24:02.943 25574-25574/? A/DEBUG: sp 00000073e4cb5f90 lr 00000074f2543c00 pc 00000074f2543c30
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: backtrace:
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #00 pc 0000000000082c30 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: f5ba4e7e3cee771446d26d581339d879)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #01 pc 000000000008369c /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+36) (BuildId: f5ba4e7e3cee771446d26d581339d879)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #02 pc 0000000000afccd0 /data/app/org.cocos2d.demo-Yn0sfytjizWZLdutSXAEhw==/lib/arm64/libcocos2djs.so (node::inspector::InspectorSocketServer::Start()+1848) (BuildId: 09ba54dbb258680f2648636cba49dfc7eac0143d)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #03 pc 0000000000aea394 /data/app/org.cocos2d.demo-Yn0sfytjizWZLdutSXAEhw==/lib/arm64/libcocos2djs.so (void node::inspector::InspectorIo::ThreadMainnode::inspector::InspectorSocketServer()+436) (BuildId: 09ba54dbb258680f2648636cba49dfc7eac0143d)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #04 pc 0000000000ae9ca4 /data/app/org.cocos2d.demo-Yn0sfytjizWZLdutSXAEhw==/lib/arm64/libcocos2djs.so (node::inspector::InspectorIo::ThreadMain(void*)+20) (BuildId: 09ba54dbb258680f2648636cba49dfc7eac0143d)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #05 pc 00000000000e2ce8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: f5ba4e7e3cee771446d26d581339d879)
2021-05-20 11:24:02.947 25574-25574/? A/DEBUG: #06 pc 0000000000084dac /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f5ba4e7e3cee771446d26d581339d879)
2021-05-20 11:24:03.266 2126-2201/? E/LauncherAnimationRunner: finish: mFinishRunnable.run
2021-05-20 11:24:03.401 25579-25579/? E/AEE_AED: Skipped - do not care third party apk
2021-05-20 11:24:03.401 25574-25574/? E/libc: Access denied finding property “persist.vendor.aee.log.status”
2021-05-20 11:24:03.402 25574-25574/? E/crash_dump64: cannot open libmiuindbg.so: No such file or directory
2021-05-20 11:24:03.402 823-823/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_01
2021-05-20 11:24:03.414 1348-2167/? E/SensorService: DEVICE_ORIENTATION time out package:com.android.server.policy.WindowOrientationListener, uid:1000
2021-05-20 11:24:03.414 1348-2167/? E/SensorService: DEVICE_ORIENTATION: use 925 ms
2021-05-20 11:24:03.418 2979-3317/? E/MtkZzEventHandler: This event type has no mtk file .
2021-05-20 11:24:03.437 27300-27300/? E/DeviceLevelUtils: isLowGpuDevice:2
2021-05-20 11:24:03.461 1348-1623/? E/InputDispatcher: channel ‘740ca6 org.cocos2d.demo/org.cocos2dx.javascript.AppActivity (server)’ ~ Channel is unrecoverably broken and will be disposed!
2021-05-20 11:24:03.467 14674-14846/? E/LilithChat: >>>>>>>>> network state changed, isAvailable = false, state name: unavailable, state ordinal: 8
2021-05-20 11:24:03.515 605-1037/? E/hwcomposer: [JOB] (0) Handle a job with no visible layer
2021-05-20 11:24:03.527 605-1037/? E/hwcomposer: [JOB] (0) Handle a job with no visible layer
2021-05-20 11:24:03.544 605-1037/? E/hwcomposer: [JOB] (0) Handle a job with no visible layer
2021-05-20 11:24:03.560 605-1037/? E/hwcomposer: [JOB] (0) Handle a job with no visible layer
2021-05-20 11:24:03.577 1348-3398/? E/InputDispatcher: Window handle Window{9505e58 u0 com.miui.touchassistant} has no registered input channel
2021-05-20 11:24:03.578 605-1037/? E/hwcomposer: [JOB] (0) Handle a job with no visible layer
2021-05-20 11:24:03.625 2126-2126/? E/RotationHelper: setCurrentTransitionRequest: request=0
2021-05-20 11:24:03.625 2126-2126/? E/RotationHelper: setCurrentTransitionRequest: request=0
2021-05-20 11:24:06.059 1348-2837/? E/TaskPersister: File error accessing recents directory (directory doesn’t exist?).
2021-05-20 11:24:06.237 588-25582/? E/ResolverController: No valid NAT64 prefix (322, /0)
2021-05-20 11:24:06.963 14674-14846/? E/LilithChat: >>>>>>>>> network state changed, isAvailable = false, state name: unavailable, state ordinal: 8