都是用ndk r28编译的。至于这个崩溃,只出现在android 15上。我跟贴主不是同一个公司的,而且那个帖子里很多人都遇到了这个问题,所以我才说这个问题用现有的打包16kb的方法必现。但是我在本地没法复现这个问题,模拟器里也没有,反复试了很多次从来没遇到崩溃的问题,只有国外的使用android 15的玩家会遇到。让他们提供具体的细节,他们也不说,恼人。
我这边是
backtrace:
#00 pc 0x00000000010b2460 /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (v8::HandleScope::Initialize(v8::Isolate*)+144) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
#01 pc 0x0000000000ba4e0c /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (se::ScriptEngine::cleanup()+88) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
#02 pc 0x0000000000ba5074 /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (se::ScriptEngine::init()+36) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
#03 pc 0x0000000000ba671c /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (se::ScriptEngine::start()+36) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
#04 pc 0x0000000000ae43ac /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (AppDelegate::applicationDidFinishLaunching()+184) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
#05 pc 0x0000000000af83c4 /data/app/~~h8CMvZoZfEH6-gR7Rf-5gg==/xxx-qhknsY6ARLuv5Lki-JmIVA==/split_config.arm64_v8a.apk!libcocos2djs.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+220) (BuildId: 71b3a4de1cf973f88c0950b3331267df1a5df0b7)
我发现cpp代码里,在init里,会先调用cleanup,就是这个cleanup触发的。
如果是崩在这,大概率是activity已经调用了destroy, 第二次进去时,由于android不会销毁进程导致上一次的v8 环境还残留。建议用我上面发的pr试试
小弟明白。好,我这就试试。希望能解决这个问题 
没有v3.8.7-16k的编辑器下载链接吗?
目前没有,后面388有版本的话会上链接
根据这个pr修改以后,2.4.10打包出来还是不支持16Kb页面特性呀ndk使用28
gradle 升级了吗?gradle-bin是否升级了?这两个升级,android studio的最低版本需要2024发布的
gradle 按照pr升到了8.10.1,gradle-bin也是8.11.1 Android studio 是2025.1.2
你是用命令行查看? 另外,如果是在模拟器验证,确认是否选了 x86_64 这个架构?
好的,我去看看
收藏一下,后面要用
大佬 我按照步骤来 ccc构建通过了 安卓打包报以下错误
D:\dabao\android-sdk-windows\ndk\28.0.12433566\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --sysroot=D:/dabao/android-sdk-windows/ndk/28.0.12433566/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DBOOST_NO_CXX98_FUNCTION_BASE -DBOOST_UUID_FORCE_AUTO_LINK -DCC_EDITOR=0 -DCC_NETMODE=0 -DCC_NETMODE_CLIENT=0 -DCC_NETMODE_HOST_SERVER=2 -DCC_NETMODE_LISTEN_SERVER=1 -DCC_PLATFORM=3 -DCC_PLATFORM_ANDROID=3 -DCC_PLATFORM_EMSCRIPTEN=9 -DCC_PLATFORM_IOS=1 -DCC_PLATFORM_LINUX=6 -DCC_PLATFORM_MACOS=4 -DCC_PLATFORM_MAC_IOS=1 -DCC_PLATFORM_MAC_OSX=4 -DCC_PLATFORM_NX=8 -DCC_PLATFORM_OHOS=5 -DCC_PLATFORM_OPENHARMONY=10 -DCC_PLATFORM_QNX=7 -DCC_PLATFORM_WINDOWS=2 -DCC_USE_ADPF=1 -DCC_USE_AR_AUTO=0 -DCC_USE_AR_CORE=0 -DCC_USE_AR_ENGINE=0 -DCC_USE_AR_MODULE=0 -DCC_USE_AUDIO=1 -DCC_USE_BOX2D_JSB=0 -DCC_USE_DEBUG_RENDERER=0 -DCC_USE_DRAGONBONES=1 -DCC_USE_EDITBOX=1 -DCC_USE_GEOMETRY_RENDERER=0 -DCC_USE_GLES2 -DCC_USE_GLES3 -DCC_USE_GOOGLE_BILLING=0 -DCC_USE_GOOGLE_PLAY_GAMES=0 -DCC_USE_JOB_SYSTEM_TASKFLOW=0 -DCC_USE_JOB_SYSTEM_TBB=0 -DCC_USE_MIDDLEWARE=1 -DCC_USE_OCCLUSION_QUERY=0 -DCC_USE_PHYSICS_PHYSX=0 -DCC_USE_SOCKET=1 -DCC_USE_SPINE=1 -DCC_USE_SPINE_3_8=1 -DCC_USE_SPINE_4_2=0 -DCC_USE_VIDEO=1 -DCC_USE_WEBP=1 -DCC_USE_WEBSOCKET_SERVER=0 -DCC_USE_WEBVIEW=1 -DCC_USE_XR=0 -DCC_USE_XR_REMOTE_PREVIEW=0 -DENABLE_FLOAT_OUTPUT=0 -DSCRIPT_ENGINE_TYPE=2 -DTBB_USE_EXCEPTIONS=0 -DUSE_V8_DEBUGGER=0 -DV8_COMPRESS_POINTERS -ID:/cocos-engine/native/external/sources -ID:/cocos-engine/native/external/sources/android-gamesdk/GameController/paddleboat/include -ID:/cocos-engine/native/external/sources/android-gamesdk/GameActivity/game-activity/include -ID:/cocos-engine/native/cocos/editor-support/spine/3.8 -ID:/cocos-engine/native/external/cmake/…/android/x86_64/include -ID:/dabao/android-sdk-windows/ndk/28.0.12433566/sources/android/native_app_glue -ID:/cocos-engine/native -ID:/cocos-engine/native/cocos -ID:/cocos-engine/native/cocos/renderer -ID:/cocos-engine/native/cocos/platform -ID:/cocos-engine/native/cocos/renderer/core -ID:/cocos-engine/native/cocos/editor-support -IE:/luanniao/otherClient/test16K/build/android/proj/build/RelWithDebInfo/b5v2j4e5/x86_64/generated -IE:/luanniao/otherClient/test16K/build/android/proj/build/RelWithDebInfo/b5v2j4e5/x86_64/generated/cocos -ID:/cocos-engine/native/cocos/bindings/jswrapper -ID:/cocos-engine/native/external/sources/EGL -ID:/cocos-engine/native/external/sources/khronos -ID:/cocos-engine/native/external/sources/pvmp3dec/src -ID:/cocos-engine/native/external/sources/pvmp3dec/include -ID:/cocos-engine/native/external/sources/tremolo/Tremolo -ID:/dabao/android-sdk-windows/ndk/28.0.12433566/sources/android/cpufeatures -isystem D:/cocos-engine/native/external/cmake/…/android/x86_64/include/uv -isystem D:/cocos-engine/native/external/cmake/…/android/x86_64/include/zlib -isystem D:/cocos-engine/native/external/cmake/…/android/x86_64/include/v8 -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fsigned-char -ffunction-sections -fdata-sections -fstrict-aliasing -frtti -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -DNDEBUG -fPIC -Wno-comment -std=c++17 -Werror=return-type -MD -MT CMakeFiles/cocos_engine.dir/D_/cocos-engine/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp.o -MF CMakeFiles\cocos_engine.dir\D_\cocos-engine\native\cocos\bindings\jswrapper\v8\ScriptEngine.cpp.o.d -o CMakeFiles/cocos_engine.dir/D_/cocos-engine/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp.o -c D:/cocos-engine/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp
D:/cocos-engine/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp:711:22: error: no matching constructor for initialization of ‘v8::ScriptOrigin’
711 | v8::ScriptOrigin origin(originStr.ToLocalChecked());
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/cocos-engine/native/external/cmake/…/android/x86_64/include/v8/v8-message.h:62:17: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from ‘Local’ to ‘const ScriptOrigin’ for 1st argument
62 | class V8_EXPORT ScriptOrigin {
| ^~~~~~~~~~~~
D:/cocos-engine/native/external/cmake/…/android/x86_64/include/v8/v8-message.h:62:17: note: candidate constructor (the implicit move constructor) not viable: no known conversion from ‘Local’ to ‘ScriptOrigin’ for 1st argument
62 | class V8_EXPORT ScriptOrigin {
| ^~~~~~~~~~~~
D:/cocos-engine/native/external/cmake/…/android/x86_64/include/v8/v8-message.h:64
note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided
64 | V8_INLINE ScriptOrigin(Isolate* isolate, Local resource_name,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65 | int resource_line_offset = 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66 | int resource_column_offset = 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 | bool resource_is_shared_cross_origin = false,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | int script_id = -1,
| ~~~~~~~~~~~~~~~~~~~
69 | Local source_map_url = Local(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | bool resource_is_opaque = false, bool is_wasm = false,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | bool is_module = false,
| ~~~~~~~~~~~~~~~~~~~~~~~
72 | Local host_defined_options = Local())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ask Gemini
creator 3.x ? 你应该有部分文件没更新,请检查下。尤其是头文件
看错误是某个文件没同步,不然你用备选方案,不升级v8的链接。engine有对应pr修改,external只更新android的动态库其没更新。
有没有成功的大佬写个傻瓜式的教程,我出一包辣条


