Android flavors for both main and library-project

When I have flavors in only one project, everything builds and runs fine.

But when I need the library project to have flavors for simple and full versions (decides which dependencies to include in the library project) it crashes at build time saying that library project resources are not found in the main project

But the main project should also be able to specify flavors (different GUI for different clients).

Is it not possible? Any explanation/info is appreciated.