Problem importing .R file in another library project

I have a problem when importing the R class from a library project in another library project. The project builds fine in eclipse but in the command line the gradle build script does not recognise the R file. (error: cannot find symbol import com.mydomain.R;)

The same problem is depicted here:

would be nice if someone could point me in the right direction. I am using gradle 1.8 and 0.6.+ of the android plugin.

br MikeT