I downloaded few source codes from Google source codes.
I executed them on Eclipse but R.java
file is not created and therefore I got many errors saying
As long as you have a valid Android project, you can use aapt package
to generate the R.java from resources. Here's example usage (all should be in one line):
aapt package --non-constant-id -f -m -M
-S -I
-J
The above can be made scriptable using ANT by using the aapt target or by simply using an exec target.