2016-05-12 63 views
0

當我嘗試在發佈模式下構建xamarin urhosharp sample project「FormsSample.Droid」並將鏈接設置爲「僅Sdk Assemblies」時,出現錯誤:無法在發佈模式下構建Xamarin UrhoSharp.Forms示例項目

Severity Code Description Project File Line Suppression State Error The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item '!!0[] System.Array::Empty()' (defined in 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve !!0[] System.Array::Empty() 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.d__26.MoveNext() FormsSample.Droid

當我將鏈接設置爲「無」時,一切正常,但生成* .apk文件非常大。

回答

0

問題已解決。我從Xamarin會員獲得的答案:

It's a known issue. Should be fixed in the next nuget update. Also I'd recommend to use "generate APK per ABI" option cause UrhoSharp has 5 native libs - ~7-14mb each.

相關問題