Android java。lang.NoSuchMethodError
我是安卓新手,我犯了以下错误
java.lang.NoSuchMethodError:安卓.support.v7.widget.RecyclerView.getChildAdapterPosition
这是我在出错之前添加的代码
Paint paint = new Paint();
paint.setStrokeWidth(5);
paint.setColor(Color.BLUE);
paint.setAntiAlias(true);
paint.setPathEffect(new DashPathEffect(new float[]{25.0f, 25.0f}, 0));
recyclerView.addItemDecoration(
new HorizontalDividerItemDecoration.Builder(getActivity()).paint(paint).build());
我应该用什么进口货
# 1 楼答案
在你的身材里。gradle加上这一行:
参见here如何使用RecyclerView