Question

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!

No correct solution

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top