title: Cannot resolve symbol 'R' in android Studio
body: <p>I know this may sound like a duplicate, but I have read and tried avery answer posted here. It is just not working for me.</p>
  
  <p>What do I need to do to fix this?</p>
  
  <p>only <code>android.R</code> is working ,  I can't use R directly. I have been hunting the solution for few days. I didn't really wanted to go back to eclipse but I wasted a lot of time already trying to resolve this.</p>
  
  <p>any idea?</p>
  
  <p>Things I tried:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/a/18183656/3205189">clean gradle</a></li>
  <li><a href="https://stackoverflow.com/a/20068221/3205189">Sync gradle</a></li>
  <li><a href="https://stackoverflow.com/a/17111686/3205189">Checked for xml errors</a></li>
  <li><a href="https://stackoverflow.com/a/23066011/3205189">Answer below</a></li>
  </ul>
  
  <p>and more....</p>