【问题标题】:MonoGame trying to use Farseer. Error: Could not load assembly - doesn't exist in the Mono for Android profileMonoGame 尝试使用 Farseer。错误:无法加载程序集 - Mono for Android 配置文件中不存在
【发布时间】:2016-07-20 10:37:55
【问题描述】:

我已经为这个错误苦苦挣扎太久了。 Xamarin bugzilla 似乎声称已修复,但在使用其最新版本后,似乎没有任何效果。我读过这个:

System.IO.FileNotFoundException: Could not load assembly...perhaps doesn't exist in the Mono for Android Profile?

但似乎解决方案特定于该程序集,而不是这个程序集。

错误

  Error XA0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'FarseerPhysics MonoGame, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? (1, 1)

如何复制:

  1. 下载并使用 Monogame (Visual Studio 2015)
  2. 下载 Farseer 物理引擎https://farseerphysics.codeplex.com/
  3. 创建新的 Android 项目
  4. 选择解决方案 > 添加现有项目 > 选择“Farseer Physics MonoGame”
  5. 添加对 Farseer Physics MonoGame 程序集的引用

注意:添加对现有项目的引用时,(第 5 步)我收到一条警告消息:

严重性代码描述项目文件行抑制状态 警告 IDE0006 加载项目时遇到错误。一些项目功能,例如对失败项目和依赖它的项目的完整解决方案分析,已被禁用。新项目 1 活跃

我非常渴望解决这个问题。请记住,我是这个东西的菜鸟。提前致谢。

【问题讨论】:

  • 有什么需要补充的吗?我希望有人在 Android 上使用 Farseer for Xamarin Monogame。

标签: c# xamarin visual-studio-2015 monogame farseer


【解决方案1】:

我正在将 Farseer Physics 用于我目前正在开发的 2D 物理游戏。

要使用 Farseer for Android,您需要创建一个新的 Android 库项目并将 Farseer 的所有源文件导入到这个新的 Android 库项目中。

您还需要为 Android 添加参考 Monogame。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-08
    • 2013-06-18
    • 1970-01-01
    相关资源
    最近更新 更多