0

I'm trying to bind an android SDK for voice chat (zoom sdk). They have two .aar files (zoomcoomonlib.aar and zoomsdk.aar)

I know I have to create separate binding project for each .aar and then reference them.

While binding zoomsdk.aar I'm getting the below error

The type `Com.Zipow.Videobox.Onedrive.ErrorEventArgs' already contains a definition for `P0' (CS0102) (B14)

enter image description here

In the .aar file I navigated to the package com.zipow.videobox.onedrive; to the interface IODFoldLoaderListener

And below are the contents of it

enter image description here

So it seems parameter String var1 of method onError is causing the issue.

And xamarin studio generated obj/debug/api.xml confirms it (below screenshot) that onError will have first parameter named p0: enter image description here

So in this scenario I change the metadata.xml to give this parameter a meaningful name.

Like below screenshot:

enter image description here

But even after doing that I am getting same error. That error didn't resolve. Moreover now if I see the obj/debug/api/.xml file I see the contents for the class IODFoldLoaderListener remains the same.

So changing the metadata.xml has no effect it seems.

Koushik Sarkar
  • 480
  • 2
  • 6
  • 18
  • Since you used images versus text, I can't not cut/paste an answer. You are not using the full method signature in your metadata transform. Try reviewing section 2 of Jon Douglas excellent Binding doc: https://gist.github.com/JonDouglas/dda6d8ace7d071b0e8cb – SushiHangover Apr 23 '17 at 15:46

1 Answers1

0

Your definition needs to be changed quite a bit. Here is an example that solves the same problem:

<attr path="/api/package[@name='com.emarsys.mobileengage.inbox']/interface[@name='ResetBadgeCountResultListener']/method[@name='onError' and count(parameter)=1 and parameter[1][@type='java.lang.Exception']]" name="argsType">ResetBadgeCountResultListenerOnErrorArgs</attr>

Please note the /interface and argsType items here as your initial definition is incorrect. You would then change the parameters to strings instead of java.lang.Exception from my example.

Jon Douglas
  • 13,006
  • 4
  • 38
  • 51