Android : R.id cannot resolve components [duplicate]

on Friday, September 19, 2014



This question already has an answer here:




I have an android project in Android studio which was working fine but is acting strangely now.


The error line is in my listAdapter.java file:



String displayName = (TextView) findViewById(R.id.t_name);


I get a cannot resolve symbol 't_name' error.


Even though t_name is defined in one of my layout files, I get "". After typing R.id., I get (auto)suggestions. Only three components show up and they are from a single different layout file. I used to get a list of components from all my layout files.


I have tried cleaning and rebuilding the project with no change.


0 comments:

Post a Comment