解決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