xamarin / java.interop

Java.Interop provides open-source bindings of Java's Java Native Interface (JNI) for use with .NET managed languages such as C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not implement member

ljzj2 opened this issue · comments

My guess is if you look at the C# IBaseInterface1.AddLisenter it will have a different method signature than BluetoothBle.AddListener, likely the listener parameter was changed to be of type Java.Lang.Object because we don't really support binding Java generics.

If so, you will need to change the BluetoothBle.AddListener parameter to also be Java.Lang.Object using metadata:

https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata#managedtype

is there auto fix feature? since there is 396 errors in sdk. it is too hard to fix one by one

Unfortunately not. Due to differences in Java and C#, there are cases where we do not have enough information to determine the correct thing to do.

If you are only using part of the API, the easiest thing to do is to <remove-node> API that you aren't using that are causing issues.