0

我想在 xamarin Android 中使用https://www.dsphotoeditor.com/库。为此,我创建了一个绑定项目。我知道如何创建绑定,我已经为 sinch 库做了。但是对于https://www.dsphotoeditor.com/,我无法解决一些错误。我已经用以下内容更新了它的metdata.xml 文件

<attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.focusablelinearlayout']" name="managedName">BindingFocusablelinearlayout</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.imagebrushview']" name="managedName">BindingImagebrushview</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.stickerview']" name="managedName">BindingStickerview</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.touchimageview']" name="managedName">BindingTouchimageview</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.touchimageview']/class[@name='TouchImageView']/method[@name='onConfigurationChanged' and count(parameter)=1 and parameter[1][@type='android.content.res.Configuration']]" name="visibility">protected</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.touchimageview']/class[@name='TouchImageView']/method[@name='onRestoreInstanceState' and count(parameter)=1 and parameter[1][@type='android.os.Parcelable']]" name="visibility">protected</attr>
   <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.touchimageview']/class[@name='TouchImageView']/method[@name='onSaveInstanceState' and count(parameter)=0]" name="visibility">protected</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.simplecropview']/class[@name='CropImageView']/method[@name='onDraw' and count(parameter)=1 and parameter[1][@type='android.graphics.Canvas']]" name="visibility">protected</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.simplecropview']/class[@name='CropImageView']/method[@name='onRestoreInstanceState' and count(parameter)=1 and parameter[1][@type='android.os.Parcelable']]" name="visibility">protected</attr>
  <attr path="/api/package[@name='com.dsphotoeditor.sdk.ui.simplecropview']/class[@name='CropImageView']/method[@name='onSaveInstanceState' and count(parameter)=0]" name="visibility">protected</attr>

添加上述 XML 中的第一到第四行是为了消除错误

“命名空间路径不能有类名。名称破坏错误”

添加了第 5 到第 10 行以使类受保护(原因:默认情况下 .Net 会创建公共类,因此会导致覆盖 java 受保护方法时出现问题)

上面的方法元数据有助于修复一些错误,但它仍然有很多错误。错误如下

类 BindingImagebrushview.ImageBrushView 具有未知的基类型 com.dsphotoeditor.sdk.ui.ac

托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 A 中的未知返回类型 com.dsphotoeditor.sdk.ui.simplecropview.a。托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 A 中的未知参数类型 com.dsphotoeditor.sdk.ui.simplecropview.bb。

托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 A 中的未知参数类型 com.dsphotoeditor.sdk.ui.simplecropview.CropImageView.a。

托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 SetCropMode 中的未知参数类型 com.dsphotoeditor.sdk.ui.simplecropview.CropImageView.a。

托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 SetGuideShowMode 中的未知参数类型 com.dsphotoeditor.sdk.ui.simplecropview.CropImageView.c。托管类型 Com.Dsphotoeditor.Sdk.UI.Simplecropview.CropImageView 中方法 SetHandleShowMode 中的未知参数类型 com.dsphotoeditor.sdk.ui.simplecropview.CropImageView.c。

此库的工作 Android 代码https://drive.google.com/open?id=1msStp0MdaGVY8QVXl8ZVpzLrqXoJQoMG

4

0 回答 0