Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

Hello everyone. I’m trying to get a project going but first I have to overcome this hurdle.
I have an error:

[quote]Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’.
Could not resolve project :lib.
Required by:
project :app
Unable to find a matching configuration of project :lib:
- None of the consumable configurations have attributes.[/quote]

My build.gradle:app is :

my build.gradle(cosmos-android) is:

and my settings.gradl is:

Is there any way I can fix this? Please help, thank you.