Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin链接程序集生成失败_Xamarin_Xamarin.android - Fatal编程技术网

Xamarin链接程序集生成失败

Xamarin链接程序集生成失败,xamarin,xamarin.android,Xamarin,Xamarin.android,我正在尝试在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.Cus

我正在尝试在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()
该“链接程序集”任务意外失败。
Java.Interop.Tools.Diagnostics.XamarinAndroidException:error XA2006:can
未解析对“System.Void.Android.Support.CustomTabs.CustomTabsInt::LaunchUrl(Android.App)”的引用。
活动,Android.Net.Uri)“”(在程序集中定义
'Microsoft.Azure.Mobile.Client,版本=4.0.1.0,区域性=中性,
PublicKeyToken=31bf3856ad364e35'),具有作用域
'Xamarin.Android.Support.CustomTabs,版本=1.0.0.0,文化=中性,
PublicKeyToken=null'。当范围与定义范围不同时
程序集,它通常意味着类型已转发。-->
Mono.Cecil.ResolutionException:未能解析System.Void.Android.Support.CustomTabs.CustomTabsInt::LaunchUrl(Android.App.Activity,Android.Net.Uri)
位于Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(指令指令)
在Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)处
在Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition方法)中
在Mono.Linker.Steps.MarkStep.ProcessQueue()中
在Mono.Linker.Steps.MarkStep.Process()中
位于Mono.Linker.Steps.MarkStep.Process(LinkContext)
在MonoDroid.Tuner.MonoDroidMarkStep.Process(链接上下文)
在Mono.Linker.Pipeline.Process(LinkContext)上
在MonoDroid.Tuner.Linker.Process(LinkerOptions选项、LinkContext和
(上下文)
在Xamarin.Android.Tasks.LinkAssembly.Execute(DirectorySassemblyResolver)
---内部异常堆栈跟踪的结束---
位于Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32代码,异常innerException,字符串消息,对象[]args)
在Xamarin.Android.Tasks.LinkAssembly.Execute(DirectorySassemblyResolver)
在Xamarin.Android.Tasks.LinkAssemblies.Execute()中
位于Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ItaskeExecutionHost.Execute()
在Microsoft.Build.BackEnd.TaskBuilder.d_uu26.MoveNext()中
我可以看到它可能与包
Microsoft.Azure.Mobile.Client
有关,但不确定我需要做什么来解决它(我对Xamarin很陌生,所以不确定如何处理这些信息)

我的版本是21


谢谢

看起来Microsoft.Azure.Mobile.Client软件包的家伙们在Android.Support.CustomTabs库方面有问题。请参阅github上发布的问题:和。看起来可以针对Android.Support.CustomTabs版本25.3.1构建Microsoft.Azure.Mobile.Client版本4.0.0,但可以针对Android.Support.CustomTabs版本23.3.0构建Microsoft.Azure.Mobile.Client版本4.0.1


就我而言,将nuget软件包Microsoft.Azure.Mobile.Client从4.0.1版降级到4.0.0版有助于构建和链接我的项目。

能否提供重现问题的详细步骤?在不了解设置细节的情况下,很难确定,但听起来您可能缺少一个依赖项,即软件包。