Home "cannot resolve symbol R" in Android Studio
Reply: 0

"cannot resolve symbol R" in Android Studio

user1507
1#
user1507 Published in June 23, 2018, 7:57 am

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 always builds fine. It is 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: Solution: 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.

My original answer that was deleted:

I think I have figured out the issue. The issue is with Android Studio, every time I added the admob library all these errors started. All my other projects without ads don't have similar issues. I'm now using Intelij and staying away from Android Studio

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.48217 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO