tags:

views:

48

answers:

1

I am trying to add an 'Android Library project' I have created to another regular Android project.

The Library Project had a jar dependency and was also dependent on another java project in my workspace. I had to add both of these to the my 'regular Android project' because otherwise Eclipse could not find them (Not sure if this was the right thing to do because it would mean that I will have to manually update all projects when the library gets another jar dependency).

Anyway, the errors went away and now the Regular Android Project can't find the R class, I have tried a clean but it did not work. I checked in the /gen folder and both the R classes are there - from the library and the regular project.They have the correct strings inside them.

what is going wrong?

A: 

It happens from time to time. I usually delete the Gen folder and hit Run as....

I get a msg saying: R deleted. Recreating! and everything goes back to normal.

Macarse
Did that, it generated the files but there is still the same errors
jax
@jax: Then your project is not compiling correctly. I would bet is a dependency issue.
Macarse
I solved it, an import to android.R had snuck in at the top of the code somehow. once I removed it everything works great.
jax