Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to fix error with JAR binding in Xamarin.Android

I have a Java JAR SDK I would like to bind in order to use with Xamarin.Android.

I have followed this guide in order to do so:

The SDK I am trying to incorporate is:

The error that is occurring states:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'MTBaseService' does not exist in the namespace 'Com.Magtek.Mobile.Android.Mtlib' (are you missing an assembly reference?) BindingLibraryT3

How would I resolve this issue?

Best Answer


  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Chances are, the type that it's looking for wasn't generated or was generated in a different namespace. A couple of things to double check:

    1) Did you ensure all reference libraries were added?

    2) Did you decompile the generated .dll to see if all types made it?

    Follow my guide here to help out in these areas:

  • philiphuynhphiliphuynh USMember ✭✭

    Thank you for your response Jon, I really appreciate your help.

    I am now trying to incorporate another SDK for Xamarin.Android.

    The error it is giving me is:
    Severity Code Description Project File Line Suppression State
    Error error: IPermissionListener has private access in UsbController
    com.idtechproducts.usbhid.sdk.UsbController.IPermissionListener Driver c:\users\philip.huynh\documents\visual studio 2015\Projects\IDTech_SDK\Driver\obj\Debug\android\src\mono\com\idtechproducts\usbhid\sdk\ 8

    Please advise on how to resolve this issue.

  • philiphuynhphiliphuynh USMember ✭✭

    Thank you so much for your help on this issue Jon! I was able to successfully bind a JAR file using your guide.

  • pepeluchepepeluche MXMember ✭✭

    @philiphuynh how did you resolve the issue? : PermissionListener has private access in UsbController
    i still having this issue and cannot run my android project because this error

Sign In or Register to comment.