Forum Xamarin.Forms
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.

The return type of a methods?

lescperlescper Member ✭✭✭✭

I add a jar file to xamarin.android project and there is some error.

“AMapOptionsCreator” do not implements “IParcelableCreator.NewArray(int)”。

but it really did implemented it.

[Register ("newArray", "(I)[Lcom/amap/api/maps/AMapOptions;", "GetNewArray_IHandler")]
        public virtual unsafe global::Com.Amap.Api.Maps.AMapOptions[] NewArray (int p0)
        {
            const string __id = "newArray.(I)[Lcom/amap/api/maps/AMapOptions;";
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue (p0);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod (__id, this, __args);
                return (global::Com.Amap.Api.Maps.AMapOptions[]) JNIEnv.GetArray (__rm.Handle, JniHandleOwnership.TransferLocalRef, typeof (global::Com.Amap.Api.Maps.AMapOptions));
            } finally {
            }
        }

The return type is extends from Java.Lang.Object.
If I change global::Com.Amap.Api.Maps.AMapOptions[] to Java.Lang.Object then it is ok. but I do not under stand the AmapOtions is extend from Java.Lang.Object why its return type is wrong?

Tagged:
Sign In or Register to comment.