ClassNotFoundException: com.google.android.play.core.assetpacks.AssetPackManagerFactory

Hi, after integrating Play Asset Delivery into my project, I’ve been getting this exception every time my game starts:

My project is using Unity 2021.3.21f and Play Asset Delivery 1.8.2. If anyone could help me out then that’d be great.

I got this error to go away like this:

  • Go to Player Settings → Publishing settings section and tick “Custom Main Gradle Template”.
  • Open the Custom Gradle file (mainTemplate.gradle) that should appear in the Assets/Plugins/Android folder.
  • Edit the dependencies section and add the line: implementation ‘com.google.android.play:asset-delivery:2.0.0’

Hope it helps.