Android Dynamic feature error <uses-split>

858 Views Asked by At

After months of successfully building my project, today I started to get the following error in using Bundletool and Google Play Store Console when I upload my app bundle (.aab):

An error occurred while running bundletool build-apks on your uploaded App Bundle. Ensure that your App Bundle is valid by running bundletool build-apks locally and try again. Learn more. Error: Module 'scanItemsAndProps' is referenced by <uses-split> but does not exist.

I do not understand what could be the cause. I checked the module 'scanItemsAndProps' (a dynamic feature of my project) against others features in the same project and there is apparently nothing wrong with it.

No documentation, no explanation for such an error. Has anyone an idea ? I'm stuck on it. Please help.

2

There are 2 best solutions below

0
On

Ok I discovered the source of the mysterious problem, just in case, it looks like if you have several Dyn. Features you must be very careful on which go on-demand and which of them go install-time, because you'll get a very cryptic error otherwise. To fix it try to put all as install-time and then change the installation type one by one to catch the one that is causing this error.

0
On

I had similar error, I managed to fix it by adding.

<dist:delivery>
  <dist:install-time />
</dist:delivery>

Before that I had

dist:onDemand="false"