캔트

2017-03-05 4 views
0

내 응용 프로그램이 디버그 모드에서 잘 작동하지만 내가 원하는 경우 릴리스를 구축하기 위해 릴리스 모드에서 내 응용 프로그램을 빌드 나는 다음과 같은 오류가 발생합니다 :캔트

Fehler 1 Unerwarteter Fehler bei der LinkAssemblies-Aufgabe. 
Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'System.Void Xamarin.Forms.Element::set_AutomationId(System.String)' (defined in assembly 'ZXing.Net.Mobile.Forms, Version=2.1.47.0, Culture=neutral, PublicKeyToken=null') with scope 'Xamarin.Forms.Core, Version=2.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 Xamarin.Forms.Element::set_AutomationId(System.String) 
    bei Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) 
    bei Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) 
    bei Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) 
    bei Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) 
    bei Mono.Linker.Steps.MarkStep.ProcessQueue() 
    bei Mono.Linker.Steps.MarkStep.Process() 
    bei Mono.Linker.Steps.MarkStep.Process(LinkContext context) 
    bei MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) 
    bei Mono.Linker.Pipeline.Process(LinkContext context) 
    bei MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) 
    bei Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) 
    --- Ende der internen Ausnahmestapelüberwachung --- 
    bei Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) 
    bei Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) 
    bei Xamarin.Android.Tasks.LinkAssemblies.Execute() 
    bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() Euroscola_App1 

이 문제는 오늘, 내가하면 잘 모릅니다부터 존재 그 이유는 내가 새로운 Xamarin 버전을 다운로드했거나 ZXing Package를 설치했기 때문입니다.

+0

문제는 당신은 ZXing을 제거 영속화합니까 AndroidLinkSkip 경우? –

답변

0

When the scope is different from the defining assembly, it usually means that the type is forwarded.

당신은 링커가 Xamarin.Android 응용 프로그램 프로젝트에서 활성화 된 응용 프로그램이 있고 Xamarin.FormsZXing.Net.Mobile.Forms에 전달 유형 사이 버전의 불일치가있다. 기본적으로 ZXing.Net.Mobile.Forms은 이전 버전의 Forms에 대해 컴파일 된 것이므로 현재 프로젝트에서 사용하고 있으며 어셈블리에 C# 확장이 포함되어있는 경우에는 매우 일반적인 문제입니다. < AndroidLinkSkip> 다음

, 그냥 하나 개 조립 연결 해제 안드로이드 응용 프로그램 프로젝트 (.csproj)을 편집하고 추가 :

두 가지 옵션은 전체 응용 프로그램에 대한 연결 해제하거나 단지 징 어셈블리에 대한 연결 해제

<PropertyGroup> 
    <AndroidLinkSkip>ZXing.Net.Mobile.Forms</AndroidLinkSkip> 
</PropertyGroup> 

참조 : 자 마린 안드로이드 링크는 :