0

我正在为 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 {

如果有人可以帮助解决此错误,那就太好了。如果需要更多信息,请告诉我

4

1 回答 1

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

于 2016-05-29T23:10:03.297 回答