2

将 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)

我该如何帮助链接器解析片段?

4

1 回答 1

1

这是 GooglePlayServicesFroyo 问题,从 10 月 19 日起可在 Xamarin 组件商店中获得修复。MapFragment 类型不再存在!您可以直接从 Xamarin 组件存储中使用 GooglePlayServicesFroyo 12.0.1 组件,并且它适用于仅 SDK 链接器选项。

我能够向 Google Play 提交启用了链接器的版本。

这是 Xamarin 论坛讨论: http ://forums.xamarin.com/discussion/8428/google-play-services-froyo-xamarin-component-doesn-t-work-in-release-mode/p2

于 2013-10-28T16:20:53.037 回答