3

Im currently using Unity 2020.3.5f1, addressable ver 1.19.17

This is how im setting up my projects :

building my addressables in Project A, and downloading and loading them into Project B. When i build the app for Android, if i uncheck Export Project in Project B, everything loads and works fine. However if Export Project is checked in Project settings, the following errors show up and the scene does not load

RemoteProviderException : TextDataProvider : unable to load from url : jar:file:///data/app/com.xxxxxxxxxxxxx==/base.apk!/assets/aa/settings.json

RuntimeData is null. Please ensure you have built the correct Player Content.
UnityEngine.ResourceManagement.AsyncOperations.InitalizationObjectsOperation:Execute()

Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].

UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=, Type=System.Object

Any help or insight would be gladly appreciated!! Thank you for your time

  • 1
    I'm having a similar issue and have literally no idea how to solve it. I've never had a hard time wrapping my head around something in Unity, but the addressable system is a nightmare in my opinion. I've never had a worse experience working in Unity. – Knight Steele Feb 04 '22 at 06:23
  • Have you managed to resolve this issue? Also doing Android export, but I have only one project, and it is still missing settings.json . I guess it has something to do with the part where addressables copy content from temp Library folder into the StreaminAssets during player build – KwahuNashoba Mar 11 '22 at 09:52

2 Answers2

0

EDIT: Tian provided the solution to an issue from the question, but that might not be acceptable if your app size is more than 150MB or if, for any other reason, you would like to split your app to apk + obb and use benefits of expansion files

Just to drop my issue and solution to it, it might help some other addressables wonderer :)

I also had an issue with loading settings.json from the first Exception in the log posted in the question. The reason for it was that we are exporting android project and then performing build from Android Studio (apk + obb) and then deploying manually on the phone. I believe that settings.json ends up in the the .obb (since it gets copied in StreamingAssets during Player build) and that is why it had trouble loading it. In order to make the work, the following steps should be respected:

  1. Connect the phone to PC
  2. Copy .apk
  3. Install .apk and launch the game (not sure if launching is mandatory)
  4. During install the folder will be created in [your phone]\Internal shared storage\Android\obb\[bundle id]. This folder is recreated each time you install the apk so you'll need to copy it each time you reinstall apk
  5. Find your .obb created by Android Studio and rename it to main.[build version].[bundle id].obb
  6. Copy it to the folder from step 4.
  7. Launch the game and it should work
KwahuNashoba
  • 244
  • 3
  • 13
0

Right, so i finally managed to figure out whats wrong with my unity project

theres are the steps i took to resolve it

1.Select Player Settings in the bottom left of the Build Settings window to bring up the player settings window

2.Scroll down to Publishing Settings, open the tab and make sure the checkbox for Split Application Binary is UNCHECKED

mine was checked for some reason and i had no idea. Hopefully this helps someone down the road