Could not find a part of the path "\Assets\Plugins\UnityPurchasing\Bin\Android"

Hello!

To give you a full picture, I initially added the GoogleMobileAds to my project, which works just fine. And in order to add a microtransaction in a shape of “Remove the ads” button I am trying to implement google billing, following these instructions Use the Google Play Billing Library with Unity  |  Google Play's billing system  |  Android Developers , but so far it doesn’t work out.
I did all steps for Unity IAP. In attached screenshots you can see that IAP is ON, does not display any warnings about COPPA or anything and accepted the google app key (which I had to add using dashboard, as suggested in various threads).

But after importing google play plugin and trying to do the “press “fix” button” step it only shows me an empty window and whenever I hover over or click inside it, the error messages pop up, all revolving around “DirectoryNotFoundException” indicating that “Assets\Plugins\UnityPurchasing\Bin\Android” folder was not found. And upon checking my project indeed there is no such folder, it only exist in the “packages” directory, since it was added through package manager. I tried IAP version 4.1.1 and then updated to 4.1.2 which makes no difference.
Unity version is 2021.2.5f1

Error message example

DirectoryNotFoundException: Could not find a part of the path ‘C:\Work\Unity Projects\Match 3\Assets\Plugins\UnityPurchasing\Bin\Android’.
System.IO.Enumeration.FileSystemEnumerator1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) (at <00c558282d074245ab3496e2d108079b>:0) System.IO.Enumeration.FileSystemEnumerator1[TResult]…ctor (System.String directory, System.IO.EnumerationOptions options) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Enumeration.FileSystemEnumerable1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable1[TResult] enumerable) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Enumeration.FileSystemEnumerable1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) (at <00c558282d074245ab3496e2d108079b>:0)
System.IO.Directory.GetFiles (System.String path) (at <00c558282d074245ab3496e2d108079b>:0)
Google.Play.Billing.Editor.GooglePlayBillingBuildHelper.GetConflictingGooglePlayBillingAarFileName () (at Assets/GooglePlayPlugins/com.google.play.billing/Editor/Scripts/GooglePlayBillingBuildHelper.cs:84)
Google.Play.Billing.Editor.GooglePlayBillingBuildHelper.HasConflictingGooglePlayBillingAarFile () (at Assets/GooglePlayPlugins/com.google.play.billing/Editor/Scripts/GooglePlayBillingBuildHelper.cs:76)
Google.Play.Billing.Editor.GooglePlayBillingBuildHelper.HasConflictingGoogleAarFile () (at Assets/GooglePlayPlugins/com.google.play.billing/Editor/Scripts/GooglePlayBillingBuildHelper.cs:59)
Google.Play.Billing.Editor.GooglePlayBillingBuildSettings.AddOptionForConflictingAarFile () (at Assets/GooglePlayPlugins/com.google.play.billing/Editor/Scripts/GooglePlayBillingBuildSettings.cs:62)
Google.Play.Billing.Editor.GooglePlayBillingBuildSettings.OnGUI () (at Assets/GooglePlayPlugins/com.google.play.billing/Editor/Scripts/GooglePlayBillingBuildSettings.cs:55)
UnityEditor.HostView.OldOnGUI () (at <3cbc70f1ae9747e88614d75932150c59>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <34e2272108514d61a3bdf37893a34ef9>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

Deleting and reinstalling package and reimporting plugin didn’t change anything. Also I tried creating empty projects without putting my assets in there just to have IAP package and google billing plugin. And yeah in that case I didn’t go through proper IAP activation, but still the result is the same an empty “Play Billing Build Settings” window. And unfortunately there is no relating code to showcase, because I haven’t written any yet, since I cannot get through the setting up stage.

Please help, I have no idea where is the source of this issue. Is IAP not installed correctly and there should be a folder inside Assets? Is GooglePlayPlugins out of date or for whatever reason looking for the wrong folder? Or am I trying to implement the wrong plugin in the first place and need to use another thing entirely. In fact there is a message, on the page I linked above, that “Google Play Billing Unity” plugin won’t be supported after November 1 2022, what are you supposed to use for Google in-app purchases in Unity games after that?

Thank you in advance.

@DeadDie The Google directions you followed are out of date and are not supported. We already include Google Billing Library v3 and have for some time. Do not install the Google plugin. You’ll want to install Unity IAP via Package Manager and install In App Purchasing 4.1.2 or above. The release notes mention the requirement to fully delete everything under Assets/Plugins/UnityPurchasing. I might suggest you revert to a back up prior to the Google import.

2 Likes

I see. Thank you.

When does IAP include Google Billing Library v4

Multi-quantity purchases

Please open a separate thread for new questions. We plan to support multi-quantity purchases, hopefully by Q2 of this year.