Problem with files in 'Resources' when building AAB split

I’m experiencing issues with my application published on the Google Play Store. While everything worked fine in various tests with the APK, unfortunately, in the final AAB build for the Google Play Store with the split application binary option enabled, there are several problems. Just for your information, the final AAB file size is 1.08 GB.

I believe the main issue stems from the fact that the content of the “Resources” folder is not being transported into the final build. I say this because inside the folder, there are simply four files: three JSON files and a Vuforia plugin configuration file.

The errors that occur are as follows:

  • “Error Unity: The Vuforia Developer Agreement needs to be accepted before using Vuforia in an application.”
  • A null reference error on the method that handles loading the JSON file with “Resources.Load(…).”

I managed to avoid the second error by manually loading the JSON files into the persistent data folder. This way, there are no errors related to the null reference of the JSON file, but the Vuforia error persists because it probably tries to find the configuration file from “Resources” without success.

In light of this, could you suggest a method for transporting the content of the “Resources” folder into the final AAB file? Do you have any advice or other insights that could help me?

No one can help me?

Which Unity and Android Version do you use?

I recently have the issue that Resource.Load does not work anymore (does return null) although the code worked for 4 years now.

Unity 2022.3.17 Silicon and Android 14

Problem is since update of either of those.

1 Like

Are you exporting to Android Studio or are you building the aab directly?

Directly

There was a google (?) bug when using Android Studio where Unity couldn’t access anything in the install-time bundle (including resources).

https://discussions.unity.com/t/907676

I don’t know if it was ever fixed, we just stopped exporting to android studio and that solved the issue. Maybe the bug made its way to the stuff Unity uses to build aabs directly.

I have Unity 2022.3.12 on Android 13.

I noticed that this issue arises if the AAB file you export is larger than a certain size X, which I don’t know. In fact, I managed to solve the problem by compressing as much as possible the files within the application. I reduced the initial weight from 1GB to 222MB, and by doing so, everything works perfectly.

So, was the issue for you related to exporting from Android Studio?

Exporting to Android Studio, yes.

1 Like

So nobody answered OPs question. Is there any solution to this? My vuforia database does not load and can’t be find.

Aab + split binary
Unity 2022.3.17f

The answer I had was if you were exporting to Android Studio, to not export to Android Studio since there is (was?) a bug there. Other than that, I do not know.

I created a new thread regarding my problem