"PlayAssetDelivery AssetPackManager API is not available"

Hello!

I have built my game’s asset management architecture around Addressables and I am currently trying to get Android Asset Packs and Play Asset Delivery up and running, to minimize app size for Google Play and offload optional content into downloadable Asset Packs.

I believe I have configured everything correctly in Unity, but honestly all the settings and lack of documentation confuses me a bit. Also, this is the first time I’m setting up PAD, so I might have gotten something wrong.

When testing, I am uploading the aab-file to Google Play Console on an internal testing track and downloading it via Google Play to ensure a real environment.

All the Addressable groups configured as install-time seem to work fine, but fast-follow and on-demand does not. Running Logcat on the build from Google Play consistently produces this error:

2024/12/16 16:57:15.661 5775 5824 Error Unity InvalidOperationException: PlayAssetDelivery AssetPackManager API is not available! Make sure your gradle project includes "com.google.android.play:asset-delivery" dependency.

From what I could gather online, Unity is supposed to include this dependency in the build automatically. However, I also tried creating a custom mainTemplate.gradle including this pack as a dependency but the error persisted.

Currently on Unity 6000.0.23 and the only thing I can think of to try is building with a more recent Unity version. I will report back if that works.

Totally stuck here and hope someone can point me in the right direction!

Nope, the error is still there in Unity 6000.0.31f.

Logcat:

2024/12/17 09:42:44.673 28614 28646 Info Unity UnityApplication::CreateInstance
2024/12/17 09:42:44.673 28614 28646 Info Unity GameActivity Package Version '3.0.5'
2024/12/17 09:42:44.673 28614 28646 Info Unity Starting Game Loop
2024/12/17 09:42:44.675 28614 28646 Info Unity Handle cmd APP_CMD_START(11)
2024/12/17 09:42:44.677 28614 28646 Info Unity Handle cmd APP_CMD_RESUME(12)
2024/12/17 09:42:44.691 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:44.691 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:44.691 28614 28646 Info Unity Handle cmd APP_CMD_CONTENT_RECT_CHANGED(5)
2024/12/17 09:42:44.693 28614 28646 Info Unity Handle cmd APP_CMD_INIT_WINDOW(1)
2024/12/17 09:42:44.702 28614 28646 Info Unity MemoryManager: Using 'Dynamic Heap' Allocator.
2024/12/17 09:42:44.716 28614 28646 Info Unity SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 11090mb
2024/12/17 09:42:44.716 28614 28646 Info Unity SystemInfo ARM big.LITTLE configuration: 6 big (mask: 0xfc), 2 little (mask: 0x3)
2024/12/17 09:42:44.716 28614 28646 Info Unity ApplicationInfo 'com.xx.xx', Version '0.14.10', Min API Level '23', Target API Level '35'
2024/12/17 09:42:44.716 28614 28646 Info Unity Built from '6000.0/staging' branch, Version '6000.0.31f1 (a206c360e2a8)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
2024/12/17 09:42:44.716 28614 28646 Info Unity Device Model 'samsung SM-S928B', OS 'Android OS 14 (API 34)'
2024/12/17 09:42:44.850 28614 28646 Info Unity Company Name: xx
2024/12/17 09:42:44.850 28614 28646 Info Unity Product Name: xx
2024/12/17 09:42:45.089 28614 28646 Info Unity     HasWindow = 1, HasFocus = 0
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_RESIZED(3)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_REDRAW_NEEDED(4)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_GAINED_FOCUS(7)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.089 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_RESIZED(3)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_REDRAW_NEEDED(4)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_CONTENT_RECT_CHANGED(5)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.094 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.350 28614 28646 Error Unity Exception: Attempting to use an invalid operation handle
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject].get_InternalOp () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject].get_Result () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.AddressableAssets.Initialization.InitializationOperation.Execute () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1+<>c__DisplayClass60_0[TObject].<add_CompletedTypeless>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] s) [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at DelegateList`1[T].Invoke (T res) [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.350 28614 28646 Error Unity   at UnityEngine.Resour
2024/12/17 09:42:45.439 28614 28646 Info Unity AndroidAssetPacks: Downloading...
2024/12/17 09:42:45.439 28614 28646 Info Unity  #0 0x741c7019b0 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #1 0x741cb935a0 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #2 0x741c430c98 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #3 0x741c430ba8 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #4 0x741af45118 (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #5 0x7419772d2c (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #6 0x741977256c (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #7 0x7419774214 (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #8 0x74197724e0 (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #9 0x741977243c (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #10 0x7419657624 (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #11 0x7419657570 (libil2cpp.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #12 0x741c640c54 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #13 0x741c654720 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #14 0x741c660360 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #15 0x741c6605a0 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #16 0x741c660d58 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #17 0x741c4abac4 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #18 0x741c56adcc (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #19 0x741c56ae0c (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #20 0x741c56b0b0 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #21 0x741c6e7cdc (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #22 0x741c6f23f0 (libunity.so) ? 0x0
2024/12/17 09:42:45.439 28614 28646 Info Unity  #23 0x74bd124118 (libgame.so) Unity::UnityApplication::ProcessFrame() 0x34
2024/12/17 09:42:45.439 28614 28646 Info Unity  #24 0x74bd124334 (libgame.so) Unity::Uni
2024/12/17 09:42:45.443 28614 28646 Error Unity InvalidOperationException: PlayAssetDelivery AssetPackManager API is not available! Make sure your gradle project includes "com.google.android.play:asset-delivery" dependency.
2024/12/17 09:42:45.443 28614 28646 Error Unity   at UnityEngine.Android.AndroidAssetPacks.GetAssetPackManager () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at UnityEngine.Android.AndroidAssetPacks.DownloadAssetPackAsync (System.String[] assetPackNames, System.Action`1[T] callback) [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at UnityEngine.Android.AndroidAssetPacks.DownloadAssetPackAsync (System.String[] assetPackNames) [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at Runtime.Bootstrappers.SceneBootstrapper.DownloadAssetPacksAsync () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at Runtime.Bootstrappers.SceneBootstrapper.DownloadAssetPacksAsync () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at Runtime.Bootstrappers.SceneBootstrapper.StartAsync () [0x00000] in <00000000000000000000000000000000>:0 
2024/12/17 09:42:45.443 28614 28646 Error Unity   at Runtime.Bootstrappers.SceneBootstrapper.
2024/12/17 09:42:45.525 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.525 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.536 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
2024/12/17 09:42:45.536 28614 28646 Info Unity Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)

Finally figured it out. It was caused by minification, which must have stripped some important code. Unchecking Project Settings - Player - Publishing Settings - Minify - Release fixed the problem :+1:

It works! Oh my god I was struggling with this same issue for a few months, you’re a savior. This also worked for Unity 6000.0.24

1 Like