Reputation: 1888
I am trying to add module dependency.
When I write,
implementation project(':services')
It shows me errors like,
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :services.
And same for,
:app@debugAndroidTest/compileClasspath,
:app@debug/compileClasspath and
:app@release/compileClasspath
But, the error goes after I write
implementation project(path: ':services', configuration: 'default')
And still the dependency is not added.
PS: I am not making my module as a library as I need to do an AOSP project. Also, My module has no activity only service.
So,please enlighten me with the reason for this to happen and what is the difference between the two?? I am naive in understanding how gradle works.
EDIT : Found the solution. Please check the answer at link : https://stackoverflow.com/a/52163856/1999190
Upvotes: 4
Views: 3191
Reputation: 3242
I had the same issue change in your module .gradle change apply plugin: 'com.android.lapplication'
to apply plugin: 'com.android.library'
Upvotes: 2