"Build error: Build failed with 4 error(s)...." while building Play Asset Delivery

The problem started when I tried uploading the .aab file and it said file size greater than 150mb can’t be accepted in Play console

I used Play Asset delivery to overcome this problem. I created the asset bundle as per this here and followed the instructions as per this link to build the file as per this link. But while building the file it said API level 31 is required. It tried to download it automatically but failed. So as per this video using command prompt I manually downloaded the API levels and overcome this problem. But while building the app bundle I am getting “Compilation failed error” the screenshot of which I am attaching

ALso later build failed with 4 errors comes in and the screenshot of the console is here:

This is what the console message looks like:

Build error: Build failed with 4 error(s)
UnityEngine.Debug:LogErrorFormat (string,object)
Google.Android.AppBundle.Editor.Internal.BuildTools.BuildToolLogger:smile:isplayErrorDialog (string) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/BuildToolLogger.cs:95)
Google.Android.AppBundle.Editor.Internal.BuildTools.AndroidBuilder:Build (UnityEditor.BuildPlayerOptions) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AndroidBuilder.cs:205)
Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder:BuildAndroidPlayer (UnityEditor.BuildPlayerOptions) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AppBundleBuilder.cs:179)
Google.Android.AppBundle.Editor.Internal.AppBundlePublisher:Build (Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder,Google.Android.AppBundle.Editor.Internal.AppBundlePublisher/AppBundleBuildSettings) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundlePublisher.cs:175)
Google.Android.AppBundle.Editor.Internal.AppBundlePublisher:Build () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundlePublisher.cs:139)
Google.Android.AppBundle.Editor.Internal.AppBundleEditorMenu:BuildAndroidAppBundle () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundleEditorMenu.cs:66)

I tried to solve this issue by googling but regarding Play Asset delivery I am not finding any great articles.

Any help will really be appreciated as I am stuck in this problem for the past 2 days. If you need any more help please let me know

I had the same, updating to the latest 2021.2 version fixed it for me. Otherwise try deleting your unity version and install it again.

And see this reply here: Man its a hell in Building Android : Unity 2020.3.19f1

@DevDunk I used Unity 2021.2.5f1 and it worked…thanks for the suggestion

1 Like

are you still using Google’s .aab build with PAD as before or are you using the split binary and Unity’s .aab build? what is the size of the .abb file?

I used the split binary and build .aab from Unity before, it changed from 200mb to 19mb, but after uploading to googleplayconsole internal test. can only enter the splash screen. that’s why i tried google PAD. the result is more than 300mb and gets an error when uploading the playstore. “One or more of the auto-generated multi-APKs exceeds the maximum allowed size of 2048 MB”. can anyone help? I’m using unity 2020.3.23

I Used 2021.2.7.f11 and still got the same errors as Chetchan, can anyone help me with this?

Build error: Build failed with 4 error(s)
UnityEngine.Debug:LogErrorFormat (string,object[ ])
Google.Android.AppBundle.Editor.Internal.BuildTools.BuildToolLogger:smile:isplayErrorDialog (string) (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/BuildToolLogger.cs:95)
Google.Android.AppBundle.Editor.Internal.BuildTools.AndroidBuilder:Build (UnityEditor.BuildPlayerOptions) (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AndroidBuilder.cs:205)
Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder:BuildAndroidPlayer (UnityEditor.BuildPlayerOptions) (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AppBundleBuilder.cs:179)
Google.Android.AppBundle.Editor.Internal.AppBundlePublisher:Build (Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder,Google.Android.AppBundle.Editor.Internal.AppBundlePublisher/AppBundleBuildSettings) (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundlePublisher.cs:175)
Google.Android.AppBundle.Editor.Internal.AppBundlePublisher:Build () (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundlePublisher.cs:139)
Google.Android.AppBundle.Editor.Internal.AppBundleEditorMenu:BuildAndroidAppBundle () (at Assets/GooglePlayBuild/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundleEditorMenu.cs:66)