5

我收到此错误

System.MissingMethodException: Method not found: 'System.Type.op_Equality'.

运行构建时。(可能是因为我在 Android 模拟器上,而 JIT 正在捕捉它。)

我在构建时收到这些警告:

Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Reference 'Mono.Android' not resolved
        For searchpath {CandidateAssemblyFiles}
        Warning: {CandidateAssemblyFiles} not supported currently
        For searchpath {HintPathFromItem}
        HintPath attribute not found
        For searchpath {TargetFrameworkDirectory}
        Considered target framework dir /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0, assembly named 'Mono.Android' not found.
        For searchpath {PkgConfig}
        Considered Mono.Android, but could not find in any pkg-config files.
        For searchpath {GAC}
        Considered Mono.Android, but could not find in the GAC.
        For searchpath {RawFileName}

我已经在我的 Mac 上安装了 Mono for Android 和 MonoTouch。这会覆盖一些设置吗?

我也收到这些警告:

Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.

我确定项目编译器下只有一些我不知道的设置。

4

1 回答 1

4

看起来您以某种方式最终构建了引用 4.0 程序集的 Mono for Android 项目。从理论上讲,除非您使用文本编辑器编辑项目文件,否则这是不可能的(MonoDevelop 不允许您修改项目以便发生这种情况)。

我建议你从一个模板创建一个新的 Mono for Android 项目,然后比较两个项目文件,看看你是否可以推断出你的问题。

于 2012-11-17T00:33:35.747 回答