I am trying to build an APK (for Android) in Unity 2017, but get a strange build error.
Here are what I have done:
(1) I have already imported Unity IAP, and have verified that the lib Store.dll actually exists inside the folder "Assets/Plugins/UnityPurchasing/Bin/Stores.dll"
(2) I have changed the Build Settings > Player Settings > API Compatibility Level to Net 2.0.
However, I still have this build error:
ArgumentException: The Assembly UnityEngine.Purchasing is referenced by Stores ('Assets/Plugins/UnityPurchasing/Bin/Stores.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache, BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:196)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Please let me know how to fix this build error. Thanks.