(can't find id reference) No resource matches the given name at

拥有回忆 提交于 2019-11-30 18:27:37

Using @+id is the right way to do it. @+id creates a new id but only if one with that name doesn't already exist.

If you don't want to do that, for this particular simple case it would suffice to move the TextEdit below the Button.

The layout which you are trying to use as a reference should be defined before it is used as reference i.e. use as 'layout_toLeftOf'.

It is like you have to declare a variable in java before using it. Declare then use it ...

If you need to mention the id before its defined in the file, then you need to use @+id/textView1 instead of @id/textView1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!