【发布时间】:2013-08-24 06:15:54
【问题描述】:
我正在使用新的 Google Maps v2 制作一个 monodroid 应用。我为 Google Play 服务创建了一个绑定,并使用了它。 当我处于调试模式时一切正常,但在发布时出现以下错误:
System.Exception: The "LinkAssemblies" task failed unexpectedly.
Mono.Cecil.ResolutionException: Failed to resolve Android.App.Fragment at
Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at
Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at
Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type) at
Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly) at
Mono.Linker.Steps.MarkStep.Initialize() at Mono.Linker.Steps.MarkStep.Process(LinkContextcontext) at
Mono.Linker.Pipeline.Process(LinkContext context) at
MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) at
Xamarin.Android.Tasks.LinkAssemblies.Execute() at
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execue()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
如果我删除 Google Play 服务绑定并映射它就可以工作。
有人可以帮忙吗?
编辑:我找到了解决方案:将链接设置为无。但我希望它能够将链接集设置为“仅 SDK 程序集”,因为 apk 文件现在变得很大。
【问题讨论】:
-
您使用的是哪个版本的 Xamarin.Android?当我引用的其中一个项目是在解决方案的更新版本中构建时,我也发生了类似的事情。
-
我使用 Xamarin.Android 4.8.0 2 编译这两个项目。我可以通过将链接设置为无来构建它。但希望它能够将链接集设置为“仅限 SDK 程序集”。
-
请在 Visual Studio 中启用详细的构建输出(例如诊断,阅读此处elbruno.com/2015/01/06/…)并将此信息添加到问题中(例如通过将其发布到gist.github.com)
标签: android google-maps xamarin.android xamarin