Error: unable to resolve dependency for… Could not resolve project

changed some things of the project two days ago. After submitting, I found that the compiler always reported errors, but the packaging was ok. Error message is as follows:

ERROR: Unable to resolve the dependency for ‘: XXX @ debugProduction/compileClasspath’ : Could not resolve project: yyy.
Show Details
Affected Modules: XXX

where ‘XXX’ and ‘yyy’ are the two modules in my project. I looked for many ways on the Internet, but I couldn’t solve them.
later went back to the last change and found that I had changed build.gradle for module x, but not for module y, and the configuration of buildTypes for the two modules was inconsistent.

so the obvious solution is to copy the configuration of buildTypes in build.gradle of module x into build.gradle of module y.

does not have to be copied exactly, only has to be configured in the same format as the two modules . My error was caused by the buildTypes in Module X, which added the configuration of the releaseTest mode, but not in Module Y.

Read More: