我正在尝试在Team Services中发布我的Xamarin.Android应用程序版本并出现以下错误:
The "LinkAssemblies" task failed unexpectedly.
Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could
not resolve reference to 'System.Void.Android.Support.CustomTabs.CustomTabsIntent::LaunchUrl(Android.App.
Activity,Android.Net.Uri)' (defined in assembly
'Microsoft.Azure.Mobile.Client, Version=4.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35') with scope
'Xamarin.Android.Support.CustomTabs, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'. When the scope is different from the defining
assembly, it usually means that the type is forwarded. --->
Mono.Cecil.ResolutionException: Failed to resolve System.Void.Android.Support.CustomTabs.CustomTabsIntent::LaunchUrl(Android.App.Activity,Android.Net.Uri)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at MonoDroid.Tuner.MonoDroidMarkStep.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(DirectoryAssemblyResolver res)
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
我可以看到它可能与包Microsoft.Azure.Mobile.Client
有关,但不确定我需要做些什么才能解决它(我对Xamarin很新,所以不知道如何处理这些信息)。< / p>
我的minSdkVersion是21。
由于
答案 0 :(得分:2)
看起来像Microsoft.Azure.Mobile.Client包的人有Android.Support.CustomTabs库的问题。请参阅github上发布的问题:Issue 364和Issue 361。看起来像Microsoft.Azure.Mobile.Client版本4.0.0可以针对Android.Support.CustomTabs版本25.3.1构建,但Microsoft.Azure.Mobile.Client版本4.0.1可以针对Android.Support.CustomTabs版本构建23.3.0。
在我的案例中,将版本4.0.1降级为nuget包的Microsoft.Azure.Mobile.Client帮助构建和链接我的项目。