尝试创建android native绑定时出现错误(实现接口)

时间:2018-12-03 06:57:42

标签: c# android xamarin.android braintree xamarin-binding

因此,我正在尝试从Android AAR构建c#绑定,并且我遵循了本指南https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-an-aar/

但是我遇到了这样的错误

  

严重性代码描述项目文件行抑制状态   错误CS0534'VaultManagerPaymentMethodsAdapter'未实现继承的抽象成员'RecyclerView.Adapter.OnBindViewHolder(RecyclerView.ViewHolder,int)'Braintree.DropIn Path \ Braintree.DropIn \ obj \ Release \ Generated \ src \ Com.Braintreepayments.Api.Dropin。 Adapters.VaultManagerPaymentMethodsAdapter.cs 9有效

还有

  

严重性代码描述项目文件行抑制状态   错误CS0534'VaultManagerPaymentMethodsAdapter'未实现继承的抽象成员'RecyclerView.Adapter.OnCreateViewHolder(ViewGroup,int)'Braintree.DropIn Path \ Braintree.DropIn \ obj \ Release \ Generated \ src \ Com.Braintreepayments.Api.Dropin.Adapters。 VaultManagerPaymentMethodsAdapter.cs 9有效

但是,如果我尝试向MetaData添加内容,则会收到错误消息,提示它已经定义

     <add-node path="/api/package[@name='com.braintreepayments.api.dropin.adapters']/class[@name='VaultManagerPaymentMethodsAdapter']">
    <method abstract="false"
            deprecated="not deprecated"
            final="false"
            name="onBindViewHolder"
            native="false"
            return="void"
            static="false"
            synchronized="false"
            visibility="public">
      <parameter name="holder"
                 type="android.support.v7.widget.RecyclerView.ViewHolder">
      </parameter>
      <parameter name="position"
                 type="int">
      </parameter>

    </method>
  </add-node>

  <add-node path="/api/package[@name='com.braintreepayments.api.dropin.adapters']/class[@name='VaultManagerPaymentMethodsAdapter']">
    <method abstract="false"
            deprecated="not deprecated"
            final="false"
            name="onCreateViewHolder"
            native="false"
            return="android.support.v7.widget.RecyclerView.ViewHolder"
            static="false"
            synchronized="false"
            visibility="public">
      <parameter name="parent"
                 type="android.view.ViewGroup">
      </parameter>
      <parameter name="viewType"
                 type="int">
      </parameter>

    </method>
  </add-node>

任何输入将不胜感激

1 个答案:

答案 0 :(得分:0)

此问题的临时解决方案是删除节点,而不是理想的解决方案,但是由于我不需要该特定的东西,因此我只是删除了它