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不一樣。
在問題模塊中使用的第三種。都改為第二種正常編譯(下圖紅框內)。