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’.

       

原因

        在网上搜了一圈,大多说的都是要改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’

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值