I’m trying to declare a dependency between 2 subprojects. My Android java project named ‘myapp’ is intended to be dependent on my Java project named ‘PC’. I followed the instrunctions from the official gradle site by adding implementation project(':PC') in build.gradle, under dependencies{} . In settings.gradle I added include ':'PC' . After doing both I got error
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :PC.
Required by:
project :app
> No matching configuration of project :PC was found. The consumer was configured to find a runtime of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes.
also tried adding
project(':PC').projectDir = new File(settingsDir, '..\\user\\PC')
to settings.graddle, but that didn’t work either, received a syntax error message: