After renaming my project package name (with Refactor), I got this error:
Error:(7, 44) error: cannot find symbol class R
All of my R
Seems like, you changed the application package name but didn't change the import statements. So look for import statement of class R. It must be like
import <package_name>.R;
If it's not a problem with import statements then look whether the R.java file has generated or not. It generally doesn't get generated if there is a problem with the application layout(xml) files. The R class file is generated only when all your xml layout files are correct.
Clean the project and check.
In my case, this error showed because I changed the package name without ticking the boxes (Search in comments and strings and Search for text occurrences)
The solution for me: Rename package again and make sure you tick the two boxes as in the photo, then Do Refactor