使用 Visual Studio 2017 预览 15.4.0 以及截至今天的所有内容的最新更新。 每当我构建我的项目时,我都会得到错误,作为一种解决方法,我几乎无处不在地将链接转换为“无”,但这不是一个修复,我真的很感激一些有用的建议我能做什么才能以应有的方式发布这个应用程序。错误是:
严重级代码描述项目文件行抑制状态 错误“LinkAssemblies”任务意外失败。 Mono.Linker.MarkException:错误处理方法:'System.Void Android.Support.CustomTabs.Chromium.SharedUtilities._MobileServices.CustomTabActivityHelper :: LaunchUrlWithCustomTabsOrFallback(Android.App.Activity,Android.Support.CustomTabs.CustomTabsIntent,Android.Net.Uri,Android.Support.CustomTabs.Chromium.SharedUtilities._MobileServices.ICustomTabFallback )” 在汇编中:'Microsoft.Azure.Mobile.Client.dll'---> Mono.Cecil.ResolutionException:无法解析System.Void Android.Support.CustomTabs.CustomTabsIntent :: LaunchUrl(Android.App.Activity,Android.Net.Uri) 在Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference 参考)在Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference 参考)at Mono.Linker.Steps.MarkStep.MarkInstruction(指令说明)
在Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition方法)
在Mono.Linker.Steps.MarkStep.ProcessQueue()---内部结束 异常堆栈跟踪--- at Mono.Linker.Steps.MarkStep.ProcessQueue()at Mono.Linker.Steps.MarkStep.Process()at Mono.Linker.Steps.MarkStep.Process(LinkContext context)at Mono.Linker.Pipeline.Process(LinkContext context)at MonoDroid.Tuner.Linker.Process(LinkerOptions选项,LinkContext& 上下文) Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)在Xamarin.Android.Tasks.LinkAssemblies.Execute()at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 在 Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()com.tapig.ria.quickmeme C:\ Program 文件(x86)\ Microsoft Visual Studio \ Preview \ Community \ MSBuild \ Xamarin \ Android \ Xamarin.Android.Common.targets 1591
我无法删除 Facebook 所需的此软件包。 Android SDK 包装客户端,但由于此问题我也无法增加我的应用尺寸,欢迎提出任何想法。
编辑:如果我启用在设备上完美调试的Android 4.4,我也会在同一标题下收到此错误。
Mono.Linker.MarkException: Error processing method: 'System.Void Acr.UserDialogs.Fragments.AbstractDialogFragment`1::OnKeyPress(System.Object,Android.Content.DialogKeyEventArgs)' in assembly: 'Acr.UserDialogs.dll' ---> System.ArgumentNullException: Value cannot be null.
Parameter name: instruction
at Mono.Cecil.Cil.InstructionOffset..ctor(Instruction instruction)
at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
at Mono.Cecil.Cil.CodeReader.ReadScopes(Collection`1 scopes)
at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
at Mono.Cecil.Cil.CodeReader.ReadScopes(Collection`1 scopes)
at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
at Mono.Cecil.Cil.CodeReader.ReadDebugInfo()
at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
at Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
at Mono.Cecil.MethodDefinition.get_Body()
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
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(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() com.tapig.ria.quickmeme C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1591
答案 0 :(得分:2)
Microsoft.Azure.Mobile.Client.dll
是从android项目引用中的不同位置引用的。改变这将解决您的问题。
答案 1 :(得分:1)
我有类似的问题,但原因来自Xamarin.Auth库。默认情况下,它会自动解析为Xamarin.Android.Support.CustomTabs v 23.3.0。修复是手动将更高版本添加到Android项目(截至目前为26.1.0.1)。