We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#142019 java.lang.IndexOutOfBoundsException index=2 count=1 com.scwang.smart.refresh.layout.SmartRefreshLayout.onLayout(SmartRefreshLayout.java:659) 升级SmartRefreshLayout到2.1.0版本后出现这个bug `# main(1)
java.lang.IndexOutOfBoundsException
index=2 count=1
解析原始 1 android.view.ViewGroup.addInArray(ViewGroup.java:5490) 2 android.view.ViewGroup.addViewInner(ViewGroup.java:5383) 3 android.view.ViewGroup.addView(ViewGroup.java:5190) 4 android.view.ViewGroup.addView(ViewGroup.java:5130) 5 androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:889) 6 androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107) 7 androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902) 8 androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860) 9 androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1647) 10 androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591) 11 androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:643) 12 androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309) 13 androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012) 14 androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578) 15 android.view.View.layout(View.java:22496) 16 android.view.ViewGroup.layout(ViewGroup.java:6528) 17 androidx.appcompat.widget.LinearLayoutCompat.setChildFrame(LinearLayoutCompat.java:1669) 18 androidx.appcompat.widget.LinearLayoutCompat.layoutVertical(LinearLayoutCompat.java:1523) 19 androidx.appcompat.widget.LinearLayoutCompat.onLayout(LinearLayoutCompat.java:1431) 20 android.view.View.layout(View.java:22496) 21 android.view.ViewGroup.layout(ViewGroup.java:6528) 22 com.scwang.smart.refresh.layout.SmartRefreshLayout.onLayout(SmartRefreshLayout.java:659) 23 android.view.View.layout(View.java:22496) 24 android.view.ViewGroup.layout(ViewGroup.java:6528) 25 androidx.appcompat.widget.LinearLayoutCompat.setChildFrame(LinearLayoutCompat.java:1669) 26 androidx.appcompat.widget.LinearLayoutCompat.layoutVertical(LinearLayoutCompat.java:1523) 27 androidx.appcompat.widget.LinearLayoutCompat.onLayout(LinearLayoutCompat.java:1431) 28 android.view.View.layout(View.java:22496) 29 android.view.ViewGroup.layout(ViewGroup.java:6528) 30 android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103) 31 android.view.View.layout(View.java:22496) 32 android.view.ViewGroup.layout(ViewGroup.java:6528) 33 android.widget.FrameLayout.layoutChildren(FrameLayout.java:334) 34 android.widget.FrameLayout.onLayout(FrameLayout.java:270) 35 android.view.View.layout(View.java:22496) 36 android.view.ViewGroup.layout(ViewGroup.java:6528) 37 android.widget.LinearLayout.setChildFrame(LinearLayout.java:1857) 38 android.widget.LinearLayout.layoutVertical(LinearLayout.java:1701) 39 android.widget.LinearLayout.onLayout(LinearLayout.java:1610) 40 android.view.View.layout(View.java:22496) 41 android.view.ViewGroup.layout(ViewGroup.java:6528) 42 android.widget.FrameLayout.layoutChildren(FrameLayout.java:334) 43 android.widget.FrameLayout.onLayout(FrameLayout.java:270) 44 android.view.View.layout(View.java:22496) 45 android.view.ViewGroup.layout(ViewGroup.java:6528) 46 android.widget.LinearLayout.setChildFrame(LinearLayout.java:1857) 47 android.widget.LinearLayout.layoutVertical(LinearLayout.java:1701) 48 android.widget.LinearLayout.onLayout(LinearLayout.java:1610) 49 android.view.View.layout(View.java:22496) 50 android.view.ViewGroup.layout(ViewGroup.java:6528) 51 android.widget.FrameLayout.layoutChildren(FrameLayout.java:334) 52 android.widget.FrameLayout.onLayout(FrameLayout.java:270) 53 com.android.internal.policy.DecorView.onLayout(DecorView.java:1146) 54 android.view.View.layout(View.java:22496) 55 android.view.ViewGroup.layout(ViewGroup.java:6528) 56 android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3743) 57 android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3207) 58 android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2166) 59 android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8887) 60 android.view.Choreographer$CallbackRecord.run(Choreographer.java:1280) 61 android.view.Choreographer.doCallbacks(Choreographer.java:1019) 62 android.view.Choreographer.doFrame(Choreographer.java:911) 63 android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1248) 64 android.os.Handler.handleCallback(Handler.java:900) 65 android.os.Handler.dispatchMessage(Handler.java:103) 66 android.os.Looper.loop(Looper.java:219) 67 android.app.ActivityThread.main(ActivityThread.java:8668) 68 java.lang.reflect.Method.invoke(Native Method) 69 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) 70 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)`
The text was updated successfully, but these errors were encountered:
我理解这个你不需要addview啊 直接用recyclerview的type来区分就行吧
Sorry, something went wrong.
No branches or pull requests
#142019 java.lang.IndexOutOfBoundsException
index=2 count=1
com.scwang.smart.refresh.layout.SmartRefreshLayout.onLayout(SmartRefreshLayout.java:659)
升级SmartRefreshLayout到2.1.0版本后出现这个bug
`# main(1)
java.lang.IndexOutOfBoundsException
index=2 count=1
解析原始
1
android.view.ViewGroup.addInArray(ViewGroup.java:5490)
2
android.view.ViewGroup.addViewInner(ViewGroup.java:5383)
3
android.view.ViewGroup.addView(ViewGroup.java:5190)
4
android.view.ViewGroup.addView(ViewGroup.java:5130)
5
androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:889)
6
androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
7
androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
8
androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
9
androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1647)
10
androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
11
androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:643)
12
androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309)
13
androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012)
14
androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578)
15
android.view.View.layout(View.java:22496)
16
android.view.ViewGroup.layout(ViewGroup.java:6528)
17
androidx.appcompat.widget.LinearLayoutCompat.setChildFrame(LinearLayoutCompat.java:1669)
18
androidx.appcompat.widget.LinearLayoutCompat.layoutVertical(LinearLayoutCompat.java:1523)
19
androidx.appcompat.widget.LinearLayoutCompat.onLayout(LinearLayoutCompat.java:1431)
20
android.view.View.layout(View.java:22496)
21
android.view.ViewGroup.layout(ViewGroup.java:6528)
22
com.scwang.smart.refresh.layout.SmartRefreshLayout.onLayout(SmartRefreshLayout.java:659)
23
android.view.View.layout(View.java:22496)
24
android.view.ViewGroup.layout(ViewGroup.java:6528)
25
androidx.appcompat.widget.LinearLayoutCompat.setChildFrame(LinearLayoutCompat.java:1669)
26
androidx.appcompat.widget.LinearLayoutCompat.layoutVertical(LinearLayoutCompat.java:1523)
27
androidx.appcompat.widget.LinearLayoutCompat.onLayout(LinearLayoutCompat.java:1431)
28
android.view.View.layout(View.java:22496)
29
android.view.ViewGroup.layout(ViewGroup.java:6528)
30
android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
31
android.view.View.layout(View.java:22496)
32
android.view.ViewGroup.layout(ViewGroup.java:6528)
33
android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
34
android.widget.FrameLayout.onLayout(FrameLayout.java:270)
35
android.view.View.layout(View.java:22496)
36
android.view.ViewGroup.layout(ViewGroup.java:6528)
37
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1857)
38
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1701)
39
android.widget.LinearLayout.onLayout(LinearLayout.java:1610)
40
android.view.View.layout(View.java:22496)
41
android.view.ViewGroup.layout(ViewGroup.java:6528)
42
android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
43
android.widget.FrameLayout.onLayout(FrameLayout.java:270)
44
android.view.View.layout(View.java:22496)
45
android.view.ViewGroup.layout(ViewGroup.java:6528)
46
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1857)
47
android.widget.LinearLayout.layoutVertical(LinearLayout.java:1701)
48
android.widget.LinearLayout.onLayout(LinearLayout.java:1610)
49
android.view.View.layout(View.java:22496)
50
android.view.ViewGroup.layout(ViewGroup.java:6528)
51
android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
52
android.widget.FrameLayout.onLayout(FrameLayout.java:270)
53
com.android.internal.policy.DecorView.onLayout(DecorView.java:1146)
54
android.view.View.layout(View.java:22496)
55
android.view.ViewGroup.layout(ViewGroup.java:6528)
56
android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3743)
57
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3207)
58
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2166)
59
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8887)
60
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1280)
61
android.view.Choreographer.doCallbacks(Choreographer.java:1019)
62
android.view.Choreographer.doFrame(Choreographer.java:911)
63
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1248)
64
android.os.Handler.handleCallback(Handler.java:900)
65
android.os.Handler.dispatchMessage(Handler.java:103)
66
android.os.Looper.loop(Looper.java:219)
67
android.app.ActivityThread.main(ActivityThread.java:8668)
68
java.lang.reflect.Method.invoke(Native Method)
69
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
70
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)`
The text was updated successfully, but these errors were encountered: