Xamarin.Android bindingtool ignoring classes

时间:2015-06-25 19:05:42

标签: android xamarin xamarin.android

I'm having some issues creating a binding for Kontakt.io's Android SDK v1.0.6 - https://github.com/kontaktio/Android-SDK/tree/master/1.0.6. I'm "almost done" (famous last words, huh?) but for some reason, some classes are being outright ignored. In particular, AbstractModel is being ignored, despite adding this to my metadata.xml file: <metadata> <attr path="/api/package[@name='com.kontakt.sdk.android.connection']/interface[@name='BeaconConnection.WriteBatchListener']/method[@name='onErrorOccured']" name="managedName">onBatchErrorOccured</attr> <attr path="/api/package[@name='com.kontakt.sdk.android.connection']/interface[@name='BeaconConnection.ConnectionListener']/method[@name='onErrorOccured']" name="managedName">onConnectionErrorOccured</attr> <attr path="/api/package[@name='com.kontakt.sdk.android.manager']/class" name="obfuscated">false</attr> <attr path="/api/package[@name='com.kontakt.sdk.android.model']/class[@name='AbstractModel']" name="obfuscated">false</attr> </metadata> I get around 100 errors due to that class not being generated - no warnings and the file isn't under the generated/src folder. Is it possible to get a more verbose output from bindingtool? After decompiling the jar, the only "odd" thing that I notice is that it's one of the few classes implementing Parcelable. abstract class AbstractModel implements Parcelable { }

1 个答案:

答案 0 :(得分:1)

原来它没有被生成(或至少从鹰眼视图中隐藏),因为它需要一个可见性覆盖:

<attr path="/api/package[@name='com.kontakt.sdk.android.model']/class[@name='AbstractModel']" name="visibility">public</attr>

希望这有助于将来。