I cleaned up my project and now I get "R cannot be resolved to a variable". It was good before I cleaned it.
I tried cleaning it again, again creating a project, creating a new project and copying all my files, and I went to the Android SDK Manager and installed all the “Android SDK Build-tools” to set all the parameters like other stackoverflow messages mentioned: 
Can anyone suggest something?

The above image shows my generated files and the R.java file is missing.

The figure above shows the problem log.
source
share