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:

http://stackoverflow.com/questions/18646157/android-library-project-cant-import-r-class-of-another-library-project-when-usi#comment28806646_18646157

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