2016-04-22 70 views
1

獲得一個編譯錯誤升級後的鏈接器的任務mvvmcross 4.1:MvvmCross 4.1升級問題IsFragmentCacheable沒有找到

The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Boolean MvvmCross.Droid.Shared.Attributes.MvxFragmentAttributeExtensionMethods::IsFragmentCacheable(System.Type)' (defined in 'MvvmCross.Droid.Support.V7.Fragging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'MvvmCross.Droid.Support.V7.Fragging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean MvvmCross.Droid.Shared.Attributes.MvxFragmentAttributeExtensionMethods::IsFragmentCacheable(System.Type) 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 Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute() --- End of inner exception stack trace --- at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) 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()

可能是什麼原因呢?所有引用的程序集都更新到4.1。

回答

12

您應該刪除MvvmCross.Droid.Support.V7.Fragging包,因爲它現在包含在MvvmCross.Droid.Support.V4中。

之後,更新您的名稱空間,並且該應用程序將再次工作!

+0

Martijn00,我有點困惑。我收到了與原始海報完全相同的錯誤信息。我嘗試刪除Mvvmcross.Droid.Support.V7.Fragging包,但IDE說我不能這樣做,因爲Xamarin.Android.Support.v7.AppCompat依賴它。我正在使用AppCompat庫,所以我不能刪除它。有任何想法嗎?謝謝! – SharpMobileCode

+0

Scratch,剛剛更新我的MvvmCross.Droid.Support.v7.AppCompat nuget包到4.1.5,它解決了我的問題。謝謝! – SharpMobileCode