Android运行时android.content.res.Resources$NotFoundException: Resource ID #0x7f0f00b3 type #0x12 错误

 在Android工程进行build没出现问题,但是在运行的时候出现以下错误

   android.content.res.Resources$NotFoundException: Resource ID #0x7f0f00b3 type #0x12 is not valid

                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572)
                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
                                                                                at android.app.ActivityThread.-wrap11(ActivityThread.java)

                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)

            .......

  经过排查,是在新添加的activity里面,该引用R.layout.XXX的地方,我惯性的写成了R.id.XXX了, 这种低级错误,很是头疼,在此,希望能够通过记录的方式,警告自己不要再犯,同时也希望能够帮助到大家

发布了53 篇原创文章 · 获赞 8 · 访问量 7万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章