Start a new topic

How to start create binding in Xamarin for android ?

Hi I am trying to use Wikitude AAR files in Xamarin....I am trying to create DLL to use in the project...I am having some issue in building it

Com.Wikitude.Tracker.IObjectTrackerListener.cs(47,47): Error CS0102: The type 'TargetsLoadedEventArgs' already contains a definition for 'p0' (CS0102) (AarBinding)

Com.Wikitude.Tracker.IObjectTrackerListener.cs(14,14): Error CS0102: The type 'ErrorLoadingTargetsEventArgs' already contains a definition for 'P1' (CS0102) (AarBinding)

Hi I tried to specify this in  MetaData.xml like this

<?xml version="1.0" encoding="UTF-8"?>
 <attr path="/api/package[@name='Com.Wikitude.Tracker.IObjectTrackerListener']/class[@name='TargetsLoadedEventArgs']/field[@name='p0']" name="managedName">P0</attr>


But it is not working any help on this appreciate

Hello Pritam,

Please provide further details on the issue:
  • Which version of the SDK are you using?
  • What device does this happen with (os Version and model)?



Hi Thank you for your reply....

I am using  Google Pixel XL API version 26 Android 8.0...But my target is set to Android 6.0

I am using wikitude SDK 6.0.1 native AAR file

I have changed the  Metadata.xml to this still have the same problem...

 <attr path="/api/package[@name='com.wikitude.tracker']/class[@name='ErrorLoadingTargetsEventArgs']/parameter[@name='p0']" name="managedName">p01</attr>

Hi Pritam,

please try the following:


<attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onTargetsLoaded']/parameter[1]" name="managedName">tracker</attr>	


If this solves your first error you should be able to apply the same to the other interfaces.

Please note that we do not officially support the Wikitude Native SDK on Xamarin.

Best Regards,


Hi Thanks for your reply...

I know..Actually I have some requirements where I will scan image in low resolution and capture it in high resolution I think the cross platform is not working fine for this....

I have achieved this functionality using the native ios SDK....want to try native one here...Dont you think it will be good idea ?



Hi Thank you very much...

I am able to resolve few issue...But I am stuck at one more place

now I have three parameters as p0,p1 and p2 How I can change them....

 <attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onErrorLoadingTargets']/parameter[1]" name="managedName">tracker</attr> 

 <attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onErrorLoadingTargets']/parameter[1]/parameter[2]" name="managedName">int</attr> 


please try the following:


<attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onErrorLoadingTargets']/parameter[1]" name="managedName">tracker</attr>

<attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onErrorLoadingTargets']/parameter[2]" name="managedName">errorCode</attr>	

<attr path="/api/package[@name='com.wikitude.tracker']/interface[@name='ObjectTrackerListener']/method[@name='onErrorLoadingTargets']/parameter[3]" name="managedName">errorMessage</attr>	


Best Regards,



Thank you very much Great :)

It is working :)

thanks again for your help.

Best regards,


Login or Signup to post a comment