Good day builders,
To enhance the engine compatibility and efficiency on sure Android gadgets (for instance terminals with ARM64 structure), we lately carried out assist for the Android 16KB reminiscence web page measurement characteristic. The associated code adjustments are prepared — we hereby invite you to combine and take a look at them to assist guarantee stability and reliability of this replace.
Core contents of this replace
- Engine core repository (
engine)
- Contents: Key code adjustments that add assist for Android 16KB web page measurement.
- Standing: Submitted as PR #18910 and awaiting merge and assessments.
- Exterior dependency repository (
exterior)
- Contents: Primarily upgrades V8 model (11.8 → 12.7.140) to match the brand new characteristic. See PR #499.
Different: keep away from bundle measurement improve from V8 improve
When you favor to not improve V8 (for instance to manage bundle measurement), we offer options:
- Engine code adjustments: manually apply the code adjustments referenced within the
enginePR #18999 to your engine model. - exterior V8 libraries: replace V8 libs (together with x64 and arm64) from the offered PR #501.
Key testing areas and requested suggestions
Please take a look at the next eventualities and report any points:
- Core regression testing: confirm primary engine functionalities on ARM64 Android gadgets (particularly gadgets utilizing 16KB web page measurement).
- Compatibility: test for any undertaking compatibility points earlier than and after the V8 improve.
- Efficiency: monitor adjustments in startup time, reminiscence footprint, and JS execution efficiency.
- Stability: run long-duration assessments to detect crashes or reminiscence leaks.
Find out how to begin testing
- Get the code:
- Change to the repository department
v3.8.7-16kand construct from that department. - The
exteriorrepo makes use of giant recordsdata — please set up git-lfs earlier than downloading.
- Put together the setting:
- [Strongly recommended] Improve your growth setting: replace Android Studio to 2024 or later to make sure the construct course of handles new dependencies and configurations.
- [Important] Clear native undertaking:
- If you have already got a constructed Android undertaking domestically, please BACK UP your undertaking’s
nativelisting (if in case you have customized adjustments). - DELETE the
nativelisting and associated construct caches (e.g.construct), then rebuild to make sure all native dependencies are accurately up to date.
- If you have already got a constructed Android undertaking domestically, please BACK UP your undertaking’s
For Cocos Creator 2.x customers
Cocos Creator 2.x customers please seek advice from the engine-native repo PR #4403 for validation. Throughout verification, make sure you use NDK 28 or newer.
Thanks for this discover.
Is that this repair carried out over the v3.8.7 launch? In case sure, the one wanted step can be to do the engine replace?
it’s simply an instance for 3.8.7, observe the PRs, it could possibly be used for 3.6. and three.7.x as effectively
So, simply to be clear, the answer was not shipped along with v3.8.7 because the default, and we should observe this resolution to supply assist?
it’s not merged into 3.8.7 but, it’s essential use the customized engine from the repo v3.8.7-16k, or you possibly can use the PR for different variations
Thanks for the affirmation!
Might you please share with me crucial adjustments I have to make to assist 16KB structure in my revealed cocos2d recreation ?
In your info? I take advantage of
#outline COCOS2D_VERSION 0x00031702
AGP 8.6.1
Gradle 8.7
and I’m imposing construct to be with ndkVersion “28.0.12433566”, because it was recomended by google developer group
As a facet observe, The emulator I take advantage of to check 16 KB assist is Pixel 7a API 35 16KB which requires x86_64, and after I add PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86:x86_64 to gradle.properties, the construct is unable to construct binaries for that structure, and it provides this error ninja: error: '../../../../../../cocos2d/exterior/Box2D/prebuilt/android/x86_64/libbox2d.a', wanted by '../../../../construct/intermediates/cxx/Debug/244g6tt4/obj/x86_64/libMyGame.so', lacking and no recognized rule to make it
So, 2 points I raised right here, first unable to check on android emulator with 16KB structure as a result of it helps solely x86_64, and the second situation is what are crucial configurations so as to add to assist 16 KB
Might you help me please, any assistance is appreciated !
I’m utilizing Cocos Creator 1.9.3 and might’t replace proper now as a result of I’m utilizing modified customized engines. Once I run the compiled app on Android with 16 KB assist, I get a crash on startup as a result of an out-of-memory error from the v8 library. Might you please inform me how one can repair this?
Is there any replace on this subject? When will the brand new launch supporting 16KB for Android be out there? I’m utilizing Cocos v2—will or not it’s supported within the subsequent launch? I’ve obtained a warning that the app have to be up to date earlier than November 1st.
We dont have a plan for brand new launch for lately. I recommend you could have attempt on the strategy we talked about above.


