这些不是错误,而是绑定生成器给你一些公平的警告。
1>BINDINGSGENERATOR : warning BG8900: Type org.apache.xml.security.transforms.Transforms: FxDG naming violation: Type name 'Transforms' matches namespace part 'Transforms'.
这只是一个警告,告诉您该名称Transforms
与前一个名称空间的一部分匹配org.apache.xml.security.transforms
。除非这些类没有生成,否则这也不是什么大问题。
\obj\Debug\generated\src\Org.Apache.Xml.Security.Algorithms.Implementations.IntegrityHmac.cs(150,20,150,31): warning CS0108: 'IntegrityHmac.IntegrityHmacRIPEMD160.GetDHandler()' hides inherited member 'IntegrityHmac.GetDHandler()'. Use the new keyword if hiding was intended.
此警告表示正在隐藏GetDHandler()
执行。IntegrityHmac.IntegrityHmacRIPEMD160
通常这是一个混淆问题。
一旦您知道要查找的内容,我确实有一个通用的绑定指南,其中涵盖了大部分这些方面:
https://gist.github.com/JonDouglas/dda6d8ace7d071b0e8cb
但是,在查看您的源代码之后,似乎一切都编译得很好。这里有一些注意事项:
- Ensure you are compiling with the correct JDK. I used JDK 1.8 in testing yours, but the documentation of the SDK you are binding to might use a different one.
- Make sure you are using the correct
Build Action
for your JARs. You can find a recommended use case in our documentation: https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/#Build_Actions (InputJar
does not embed into the .dll and must be found at runtime. Thus you should use EmbeddedJar
)