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

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