Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac‘ Could not resolve all
问题android studio 报错:Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’. >Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’. &nb
问题
android studio 报错:
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’. >
Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’.
原因
在网上搜了一圈,大多说的都是要改buid.gradle的内容。
我寻思着这项目在公司都跑得通,怎么在家居家办公,拉下来的代码就跑不通了?应该不是buid.gradle的问题。看报错信息应该是什么dependencies找不到,这个工程里依赖了一些git submodule,可能是这些git子仓库没拉下来。
解决办法:
在IDE的terminal 运行 git submodule update --init --recursive
,更新项目中的所有子仓库,重新build,就能运行了。
如果你的项目没有依赖git子仓库,那肯定不是这个原因,也不是上面这个解决方法。其他原因可参考:Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’
更多推荐
所有评论(0)