解决declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :kdps-common.


gradle build

FAILURE: Build failed with an exception.
\
* What went wrong:
Could not resolve all dependencies for configuration ':testRuntimeClasspath'.
> Project : declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :project-common.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.841 secs


使用gradle build -x test --debug --stacktrace也看不出什么
发现在这个build.gradle中引入的三个其他模块都不行。而其他模块之间相互依赖是正常的。
在目录中发现问题模块的不同之处:

右边是其他能正常编译的模块。
之所以出现这样的情况:是因为当初创建模块的时候,使用的gradle不一样。
在问题模块中使用的第三种。都改为第二种正常编译(下图红框内)。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM