java.lang.ArrayIndexOutOfBoundsException

length=12; index=-1

Samebug tips0

There are no available Samebug tips.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web565

  • Stack trace

    • java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 at java.util.ArrayList.get(ArrayList.java:310) at com.example.alaashammaa.charts.MainActivity$1.getFormattedValue(MainActivity.java:65) at com.github.mikephil.charting.components.AxisBase.getFormattedLabel(AxisBase.java:451) at com.github.mikephil.charting.components.AxisBase.getLongestLabel(AxisBase.java:437) at com.github.mikephil.charting.renderer.XAxisRenderer.computeSize(XAxisRenderer.java:78) at com.github.mikephil.charting.renderer.XAxisRenderer.computeAxisValues(XAxisRenderer.java:73) at com.github.mikephil.charting.renderer.XAxisRenderer.computeAxis(XAxisRenderer.java:66) at com.github.mikephil.charting.charts.BarLineChartBase.notifyDataSetChanged(BarLineChartBase.java:339) at com.github.mikephil.charting.charts.Chart.onSizeChanged(Chart.java:1727) at com.github.mikephil.charting.charts.BarLineChartBase.onSizeChanged(BarLineChartBase.java:1563) at android.view.View.sizeChange(View.java:18114) at android.view.View.setFrame(View.java:18076) at android.view.View.layout(View.java:17991) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:433) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:3146) at android.view.View.layout(View.java:17995) at android.view.ViewGroup.layout(ViewGroup.java:5817) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2759) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2460) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1528) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7564) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:622) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7331) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Indri YunitaIndri Yunita
    6 times, last one,
    filpgamefilpgame
    2 times, last one,
    bmacedobmacedo
    2 times, last one,
    ajinkya_wajinkya_w
    40 times, last one,
    BennyBenny
    8 times, last one,
    35 more bugmates