When I add a library, the R file is removed and I get the "R cannot be resolved to a variable" error.
This happens when I add the
Android-ViewPagerIndicator
library by marking it as a library in its properties
and then add it to my project.
I have cleaned and rebuilt the project, but still the R file doesn't appear in the /gen
folder
The library's android-support-v4.jar
file was not the same as my project's, because its size is different by 200KB (600KB). I replaced the library's android-support-v4.jar
with my project file; without this I get lot of errors!
The problem is that your new library already have android-support-v4.jar in it, so now there are two. Try deleting the android-support-v4.jar from your libs folder.