Android支持设计库崩溃

时间:2016-08-22 12:50:31

标签: android android-support-design

我最近从Android支持设计库中收到此错误。是否有一个已知的错误相同?是否有人得到类似的错误。

AndroidRuntime  E  FATAL EXCEPTION: main
                     E  Process: com.myeglu.android.canary, PID: 11638
                     E  java.lang.IndexOutOfBoundsException: Invalid index 5, size is 5
                     E      at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
                     E      at java.util.ArrayList.get(ArrayList.java:308)
                     E      at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:848)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1197)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                     E      at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                     E      at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                     E      at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
                     E      at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
                     E      at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                     E      at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                     E      at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
                     E      at android.view.View.layout(View.java:16651)
                     E      at android.view.ViewGroup.layout(ViewGroup.java:5440)
                     E      at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2183)
                     E      at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1943)
                     E      at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1119)
                     E      at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6060)
                     E      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
                     E      at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                     E      at android.view.Choreographer.doFrame(Choreographer.java:606)
                     E      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                     E      at android.os.Handler.handleCallback(Handler.java:746)
                     E      at android.os.Handler.dispatchMessage(Handler.java:95)
                     E      at android.os.Looper.loop(Looper.java:148)
                     E      at android.app.ActivityThread.main(ActivityThread.java:5443)
                     E      at java.lang.reflect.Method.invoke(Native Method)
                     E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
                     E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

1 个答案:

答案 0 :(得分:1)

您只需要更新到最新的支持设计库版本

    compile 'com.android.support:design:24.2.1'