So finally
Mystery of R.java is revealed!!!
Its purely related to res folder!!
1)Proper Naming Must Be Followed i.e only
small letters a-z,
numbers 0-9,
underscore _ and dot .
must be present in any file in res folder.
2)There should be no errors in the xml files.
3)There should be no extra text in between tags.
4)The xml files should not be just left empty.
If you had anything else which caused the problem, please post it here...