Cannot resolve symbol ‘R’ android studio

mình tìm trên mạng mà không biết sửa thế nào

ai giups mình với?

In every instance in all of my classes where i reference R.id.something the R is in red and it says “cannot resolve symbol R”, also every time there is R.layout.something it is underlined in red and says “cannot resolve method setContentView(?)”. The project however never fails to build and does work fine. It is just annoying to see this all the time. I have read many other questions on here about something similar but most involved importing projects from eclipse. I am using what i believe to be the most recent version of android studio and the project was created with android studio and worked without any cannot resolve R problems. I would like to know what causes this if anyone knows.

UPDATE: Please accept my apologies for never updating this. I solved my own problem since this has been posted. At the time android studio was brand new and I was also a brand new developer. I should never had been using android studio, I never realized how unfinished it was. Thanks everyone for the support in trying to help since this has been posted. Ironically the actual “answer” to this question has been deleted and cannot be undeleted. I feel that my original answer is the solution to this problem, in short don’t use android studio if you are new to android development.