Xamarin绑定Android sdk

时间:2016-05-29 21:16:26

标签: android xamarin xamarin.android xamarin-binding

我正在为android SDK创建一个xamarin绑定,我在构建绑定项目时遇到了一些错误。其中一个错误是:

错误CS0234:The type or namespace name ITrustDefenderMobileStandardV2' does not exist in the namespaceCom.Threatmetrix.TrustDefenderMobile'. Are you missing an assembly reference? (CS0234) (WePayAndroidBinding)

当我双击错误时,它会显示以下代码:

// Metadata.xml XPath class reference: path="/api/package[@name='com.threatmetrix.TrustDefenderMobile']/class[@name='TrustDefenderMobile']"
[global::Android.Runtime.Register ("com/threatmetrix/TrustDefenderMobile/TrustDefenderMobile", DoNotGenerateAcw=true)]
public partial class TrustDefenderMobile : global::Java.Lang.Object, global::Com.Threatmetrix.TrustDefenderMobile.ITrustDefenderMobileStandardV2 {

如果有人可以帮助解决此错误,那真的很棒。如果需要更多信息,请告诉我

1 个答案:

答案 0 :(得分:0)

我有它的工作。我在Metadata.xml文件中添加了以下语句。

<attr path="/api/package[@name='com.threatmetrix.TrustDefenderMobile']/interface[@name='TrustDefenderMobileStandardV2']" name="visibility">public</attr>

我已经反编译了jar文件,并帮助了我。请参阅此博客以获取更多帮助。 http://www.itexico.com/blog/bid/98568/Xamarin-Mobile-Development-Consuming-Java-Libraries-from-C-in-Xamarin-Android-Part-2