2016/09/14

Android Studio 2.2 - How to solve the issue of "Error. The id "textView" is not defined anywhere. Did you meant textView2?"

This is a quick summary of how to solve the issue of "Error. The id "textView" is not defined anywhere. Did you meant textView2?"

Description:

When viewing the layout in Design view mode. There is a warning mark on the upper right corner of the Design view window (circled in red in the below photo).




When clicking on the warning mark, a window pop up with the message "Error. The id "textView" is not defined anywhere. Did you meant textView2?".


Solution:

This issue is caused by not having an id name assigned to the 1st TextView (see below photo).


The 2nd TextView doesn't have this issue because it has an id name "textView2" assigned to it (see below photo).


To solve this issue, simply assign a name to the id field of the 1st TextView. For example, after assigning a name "textView", the warning mark disappears.


No comments:

Post a Comment