Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

[Android]Java.Lang.ArrayIndexOutOfBoundsException thrown when using the custom library.

$
0
0

Hi,

I am trying to run the custom library in VS 2019 Mac with Android version 7.1 but i am getting the following exception. Please suggest me how to resolve this.

My code:

TypedArray styledAttrs = context.Theme.ObtainStyledAttributes(attributes, Resource.Styleable.CustomControl, styleAttributes, styleRes);
scale.StartAngle = styledAttrs.GetFloat(Resource.Styleable.StartAngle, (float)scale.StartAngle);

Exception:

Java.Lang.ArrayIndexOutOfBoundsException: length=636; index=720
at Java.Interop.JniEnvironment+InstanceMethods.CallFloatMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <3f0dfed935344816aef2b177cb7cdcaa>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualSingleMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <3f0dfed935344816aef2b177cb7cdcaa>:0
at Android.Content.Res.TypedArray.GetFloat (System.Int32 index, System.Single defValue) [0x00035] in <4c3a009e1b504a10bee066556d7ee14a>:0


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>