Reputation: 929
I'm trying to bind an AAR library to a Xamarin android project.
Using jar2xml as AndroidClassParser in the binding project the main issue that i have is the fact that the AAR library contains a realm DB, realm creates some proxy interfaces that contains some variables with a $ inside the variable name, this result in this error
CS1056 Unexpected character '$'
instead using class-parse as AndroidClassParser result in other error such as this
CS0111 Already defines a member called 'Translate' with the same parameter types
this is the java code that raise the CS0111 error
public interface ModelTranslator<T extends DomainClass, S> {
S translate(T from);
void translate(T from, S to);
T translate(S from);
void translate(S from, T to);
}
is there a way to fix this?
EDIT: I have fixed most of the issue inside Metadata.xml
the only things that remains to fix is a class that extends Comparator
converting this class result in this error.
CS0534 C# does not implement inherited abstract member
but the class implement everything that is present inside Comparator
Upvotes: 0
Views: 294
Reputation: 931
This answer might help you Unexpected Character $ - Java Binding error
If you do need this member, define a rename transformation in metadata like this: " name="managedName">ValidNameHere.
And here some useful blog post that shows the troubleshooting for many Binding errors scenarios: https://www.codepool.biz/binding-android-library-xamarin-disaster.html
Upvotes: 0