将Google Play服务添加到我的应用程序后,我收到以下错误消息。 我启用了Link SDK Assms,启用它是至关重要的。
此处示例:https://dl.dropboxusercontent.com/u/19503836/so_googlemaptest.droid.zip
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: 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(LinkContext context)
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.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (googlemaptest.droid)
如何帮助链接器解析Fragment?
答案 0 :(得分:1)
从10月19日开始,Xamarin Component商店中提供了GooglePlayServicesFroyo问题和解决方案。 MapFragment类型不再存在!您可以直接从Xamarin组件商店使用GooglePlayServicesFroyo 12.0.1组件,它适用于SDK Only链接器选项。
我能够向Google Play提交启用了链接器的版本。
以下是Xamarin论坛讨论: http://forums.xamarin.com/discussion/8428/google-play-services-froyo-xamarin-component-doesn-t-work-in-release-mode/p2