Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Binding jar error please help me.

lescperlescper Member ✭✭✭✭

'“ArcOptionsCreator”不实现接口成员“IParcelableCreator.NewArray(int)”。“ArcOptionsCreator.NewArray(int)”无法实现“IParcelableCreator.NewArray(int)”,因为它没有“Object[]”的匹配返回类型。

int the android

public class AMapOptionsCreator implements Parcelable.Creator<AMapOptions> {
  public AMapOptions createFromParcel(Parcel paramParcel) {
    AMapOptions aMapOptions = new AMapOptions();
    CameraPosition cameraPosition = (CameraPosition)paramParcel.readParcelable(CameraPosition.class.getClassLoader());
    aMapOptions.mapType(paramParcel.readInt());
    aMapOptions.logoPosition(paramParcel.readInt());
    aMapOptions.camera(cameraPosition);
    boolean[] arrayOfBoolean;
    if ((arrayOfBoolean = paramParcel.createBooleanArray()) != null && arrayOfBoolean.length >= 6) {
      aMapOptions.rotateGesturesEnabled(arrayOfBoolean[0]);
      aMapOptions.scrollGesturesEnabled(arrayOfBoolean[1]);
      aMapOptions.tiltGesturesEnabled(arrayOfBoolean[2]);
      aMapOptions.zoomGesturesEnabled(arrayOfBoolean[3]);
      aMapOptions.zoomControlsEnabled(arrayOfBoolean[4]);
      aMapOptions.zOrderOnTop(arrayOfBoolean[5]);
      aMapOptions.compassEnabled(arrayOfBoolean[6]);
      aMapOptions.scaleControlsEnabled(arrayOfBoolean[7]);
    } 
    return aMapOptions;
  }

  public AMapOptions[] newArray(int paramInt) {
    return new AMapOptions[paramInt];
  }
}

in the generated code:

[global::Android.Runtime.Register ("com/amap/api/maps/model/ArcOptionsCreator", DoNotGenerateAcw=true)]
    public partial class ArcOptionsCreator : global::Java.Lang.Object, global::Android.OS.IParcelableCreator {
[Register ("createFromParcel", "(Landroid/os/Parcel;)Lcom/amap/api/maps/model/ArcOptions;", "GetCreateFromParcel_Landroid_os_Parcel_Handler")]
        public virtual unsafe Java.Lang.Object CreateFromParcel (global::Android.OS.Parcel p0)
        {
            const string __id = "createFromParcel.(Landroid/os/Parcel;)Lcom/amap/api/maps/model/ArcOptions;";
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue ((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object) p0).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod (__id, this, __args);
                return global::Java.Lang.Object.GetObject<global::Com.Amap.Api.Maps.Model.ArcOptions> (__rm.Handle, JniHandleOwnership.TransferLocalRef);
            } finally {
            }
        }
}

how to fix it?

Tagged:

Answers

Sign In or Register to comment.