java.lang.NoSuchFieldError: 完美解决办法,以及原因

FATAL EXCEPTION: main
                                                                              Process: cn.com.jusoft.epumping.staff, PID: 27129
                                                                              java.lang.NoSuchFieldError: No static field ib_select of type I in class Lcom/ufo/imageselector/R$id; or its superclasses (declaration of 'com.ufo.imageselector.R$id' appears in /data/app/cn.com.jusoft.epumping.staff-Jqv742Hw1WhlfWk2DplCGA==/base.apk)
                                                                                  at com.ufo.imageselector.adapter.BasicAdapter$ViewHolder.(BasicAdapter.java:60)
                                                                                  at com.ufo.imageselector.adapter.AlbumAdapter.onCreateViewHolder(AlbumAdapter.java:32)
                                                                                  at com.ufo.imageselector.adapter.AlbumAdapter.onCreateViewHolder(AlbumAdapter.java:22)
                                                                                  at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6411)
                                                                                  at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5597)
                                                                                  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5482)
                                                                                  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5478)
                                                                                  at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2215)
                                                                                  at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:556)
                                                                                  at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1502)
                                                                                  at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearL

重点内容

解决办法:找到报错的ID——No static field ib_select of type I in class 这里是ib_select
然后查找到 该Layout所在布局,—->然后搜索布局名称,会找到相同名称的.更改自己的布局名称;重新运行即可

原因:!!!!!!!!

文件名相同,依赖的文件名与自身写的相同,导致数据重复引用错误

你可能感兴趣的:(android,错误整理)