Java
.lang.IllegalArgumentException: Wrong state class, expecting View State but received class cn.etouch.ecalendar.waterfallview.StaggeredGridView$GridListSavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/refresh_gridView. Make sure other views do not use the same id.
按照Log的提示,大概意思是id起了冲突。我查看过布局文件,并没有发现有起冲突的id。网上还有一些说通过clean项目,这个也解决不了问题。百度查了很多相关的内容,然而并无卵用......
解决方法
:
加入上方一行代码 OK,问题解决...参数3是我有3页需要滑动
在使用ViewPager时遇到了IllegalArgumentException,错误信息提示id冲突。检查布局文件未发现明显问题,尝试清理项目并未解决问题。经过搜索和尝试,通过在代码中添加特定行解决了这个问题,允许顺利滑动3个页面。
1764

被折叠的 条评论
为什么被折叠?



