资源或ID存在,但是编译运行却报错找不到资源问题解决.No resource found that matches the given name

/layout/dk_dialog_errornotice.xml:16:38-60: AAPT: No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/bd_notice_toptitle').

报错中的id位置找到后,发现是存在的,并没有丢失,但系统却 说找不到.看下图代码:

让View在TextView的左边, View在识别的时候却找不到 bd_notice_toptitle 这个id,后来尝试把TextView写到前面,编译的时候就会先识别到 bd_notice_toptitle 这个id, 问题解决:

猜你喜欢

转载自blog.csdn.net/zhao8856234/article/details/116991467
今日推荐