我收到此错误
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.
我确信项目编译器下面只有一些我不知道的设置。
答案 0 :(得分:4)
看起来你已经不知何故最终构建了引用4.0程序集的Mono for Android项目。理论上,除非您使用文本编辑器编辑项目文件,否则这是不可能的(MonoDevelop不允许您修改项目以便这样做)。
我建议您从模板中创建一个新的Mono for Android项目,并比较两个项目文件,看看是否可以推断出你的错误。