【问题标题】:Unity Build Error : ('Assets/Plugins/UnityPurchasing/Bin/Stores.dll') : the dll is not allowed to be included or could not be foundUnity Build Error : ('Assets/Plugins/UnityPurchasing/Bin/Stores.dll') : dll 不允许包含或找不到
【发布时间】:2018-11-25 23:21:02
【问题描述】:

我正在尝试在 Unity 2017 中构建 APK(适用于 Android),但遇到一个奇怪的构建错误。

这是我所做的:

(1) 我已经导入了 Unity IAP,并验证 lib Store.dll 确实存在于文件夹 "Assets/Plugins/UnityPurchasing/Bin/Stores.dll"

(2) 我已将 Build Settings > Player Settings > API Compatibility Level 更改为 Net 2.0

但是,我仍然有这个构建错误:

ArgumentException:程序集 UnityEngine.Purchasing 被 Stores ('Assets/Plugins/UnityPurchasing/Bin/Stores.dll') 引用。但是dll不允许被包含或找不到。 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse(System.String assemblyPath,System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 缓存,BuildTarget 目标)(在 /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy(System.String[] 路径,System.String[] 文件夹搜索,BuildTarget 目标)(在 /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:196) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

请告诉我如何修复此构建错误。谢谢。

【问题讨论】:

    标签: c# unity3d dll build in-app-purchase


    【解决方案1】:

    我已经解决了这个问题。

    基本上,我需要启用 IAP 购买选项如下:转到 Unity 菜单栏 -> 点击窗口 -> 服务 -> 应用内购买 -> 启用强>。

    之后,构建工作正常。

    --

    PS:我切换了几次项目,忘记在新项目中重新启用 IAP。这就是出现此错误的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-23
      • 1970-01-01
      • 2014-02-19
      • 1970-01-01
      • 2015-09-14
      • 1970-01-01
      • 2022-07-12
      相关资源
      最近更新 更多