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

前端 未结 2 1452
轮回少年
轮回少年 2021-01-04 07:59

I have the following inside a relative layout.



        
2条回答
  •  执念已碎
    2021-01-04 08:25

    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

提交回复
热议问题