This feature is so necessary. Currently our game is over 200MB and cannot be uploaded to the store. I looked it up and it says that uploading is possible using this feature.
I don’t know what part of cocos creator I need to change to make this feature. If you have any tutorials or videos about this, could you please share them?
You need to modify your Android Gradle build files to enable the assets to be configured as an Asset Pack together with install-time/content delivery plugins
First, create a new module for your Android output build project and move the build assets content (all your .js .HTML files folder) to this module /assets folder. You will need to create/change the build.gradle and AndroidManifest files to your needs
The Asset-pack-entry value here is the folder name and path to be used to locate your game bundle. android:hasCode=“false” is essential to define this as a pure asset bundle and get the 1.5GB limit to upload.
Now, you need to modify the main app gradle files and also the project settings
on the build.gradle of the main app, you will need to add a few lines:
android {
// ... all previous code
sourceSets.main {
// ... if there is any reference here to the path of the build files, remove them
}
assetPacks = [":{YOUR_MODULE_NAME}"]
bundle {
language {
enableSplit = true
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
}
dependencies {
// ... all previous dependencies
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation 'com.google.android.play:feature-delivery:2.1.0'
}
And then on your settings.gradle file for the main Android project, you should include your module
include ":{YOUR_MODULE_NAME}"
And that is it. This should be enough for you to figure out this problem. Use ChatGPT or similar in case you stuck and eventually will work.
Thank you so much for your valuable answer… Could you please help me a little more? The build was successful so far, but nothing appears on the screen.
Unfortunately, I do not have a project to share under this organization.
But looking over the images you posted, you should be close.
Did you add this step for your main app (the alcatmist project over your organization)? Otherwise, the main app will not know this asset pack scope exists.
Take a deep look at the Google documentation and use the “Analyze” option after building the .aab file to ensure the bundles were constructed correctly.
Also, when creating a new module using Android Studio, there are a few options before asking what this module will be. This might help configure a few steps automatically.