ReactiveUI icon indicating copy to clipboard operation
ReactiveUI copied to clipboard

LinkAssemblies failed on Android - Android.Webkit.CallbackProxy in ReactiveUI-Events v6.5 and v7

Open ghuntley opened this issue 10 years ago • 8 comments

ReactiveUI-Events v6.5 and v7 on Android does not compile/link because Android.Webkit.CallbackProxy has been stubbed out by Xamarin.

https://reactivex.slack.com/archives/reactiveui/p1465663763000002

Severity    Code    Description Project File    Line    Suppression State
Error       The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Webkit.CallbackProxy' (defined in 'ReactiveUI.Events, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null') from 'ReactiveUI.Events, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Webkit.CallbackProxy
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
   at Mono.Linker.Steps.MarkStep.InitializeFields(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.Initialize()
   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() App.Droid           

ghuntley avatar Jun 14 '16 23:06 ghuntley

Any news on a fix for this? Or a work-around?

kiwipiet avatar Jun 26 '16 03:06 kiwipiet

I'm happy to build from source as a work around, but I'm not sure where to start. I tried running MakeRelease.ps1, but that just produces garbage for me I've tried both the Rxui6-master and Rxui7-master branches

Any tips on what I should be doing?

kiwipiet avatar Jun 27 '16 21:06 kiwipiet

Found a work around: build reactiveui from the myget branch. just run build.cmd

kiwipiet avatar Jun 28 '16 20:06 kiwipiet

I just realized that there are builds accessible on myget: https://www.myget.org/F/reactiveui/api/v2

kiwipiet avatar Jun 28 '16 20:06 kiwipiet

I Meet Same Problem, Any work around?

quiet324 avatar Aug 13 '16 06:08 quiet324

Just Remove ReactiveUI and related codes. sigh...

quiet324 avatar Aug 13 '16 08:08 quiet324

@quiet324 : why must you remove it? I've got same issue but only if I use linking assemblies when building the project. If set Linking to 'None' then you should not have any problem. FYI: I'm using ReactiveUI 6.5.0

huyttq avatar Aug 18 '16 06:08 huyttq

@kiwipiet / @huyttq,/ @quiet324

Bad news:

The Xamarin ecosystem has evolved too much since v6.5, this is working in v7 and we won't be back-porting.

Good news:

You can use the RxUIv7 reactiveui-events package (available from MyGet) in v6.5 with no issues. as reactiveui-events does not define a dependancy to reactiveui-core (v7), in fact ReactiveUI and ReactiveUI-Events are two totally seperate products. Events is just a bunch of extension methods for Rx that are code generated by inspecting the platform API. By using v7 events you will be able to use full linking, otherwise if you remain at v6.5 linking must remain off.

This is super dorky, please accept our apologies. :/

ghuntley avatar Aug 18 '16 07:08 ghuntley