Fail to build App Bundle (.aab file) with ARcore

There is an issue when building App Bundles with ARcore installed and checking “split application binary”, you get this error:

UnityException: Checking APKs size failed
[BT:1.6.0] Error: Both modules 'base' and 'UnityDataAssetPack' contain asset entry 'assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json'. Both modules 'base' and 'UnityDataAssetPack' contain asset entry 'assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json'.

I found more people with the exact same issue here:

Are you aware of this? Are there any temporary fixes we can apply until a permanent fix is available?

Hey there! So, this is actually an active issue. You can track the progress using the following:

1 Like

For the record, you can write a build postprocessor to delete the duplicate. Implement IPostGenerateGradleAndroidProject in an editor file, and Directory.Delete(Path.Combine(path, @"../UnityDataAssetPack/src/main/assets/bin/Data/UnitySubsystems"), true);.

If you also do non-AAB builds best check the path exists first.

That issue is marked as non-reproducible. It’s reproducible 100% of the time here, but the repro steps are wrong there. Split Application Binary must be on for Unity to create the UnityDataAssetPack. My actual determination on whether a build has succeeded or not is different too, we don’t do build and run, builds succeed every time, what fails is processing of the build when uploading the AAB to the Play Store (which is presumably the same process).

Thank you for the workaround @AlkisFortuneFish !

I made it into a script if anyone needs, just drag & drop to the Editor folder.


7626961–948958–AndroidAppBundlePostProcessBuild.cs (567 Bytes)

1 Like

Guys, for this or almost similar cases (in which problem with the different file direction) I advice you just to delete Library folder from Unity project, then start your project from Unity hub. Unity will rewrite its Library without any problems, and this problem will go away. It helped me to solve this. I always do the Library rewrite in such weird cases. Hope my advice will help other people! :slight_smile: But remember, if your project is quite large (>40Gb), then it can take really a lot of time. Rewrite of Library takes 1-1.5 hours (but obviously it also depends from your`s PC capacity), switching adain to Android takes 1 hour, first build after that can be up to 1-2 hours.

If you are still having issues, please file a bug.