当前位置:   article > 正文

Gradle Build Running报错Could not determine the dependencies_could not determine the dependencies of null.

could not determine the dependencies of null.

AndroidStudio 4.1.1 运行时报如下错误:

Gradle Build Running…很长时间后

Could not determine the dependencies of task ':app:compileUgDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:ugDebugCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-measurement-base:[17.0.0].
     Required by:
         project :app > com.google.android.gms:play-services-measurement:17.0.0
         project :app > com.google.android.gms:play-services-measurement-api:17.0.0
         project :app > com.google.android.gms:play-services-measurement-sdk:17.0.0
      > Skipped due to earlier error
      > Skipped due to earlier error
   > Could not resolve com.google.android.gms:play-services-measurement-impl:[17.0.0].
     Required by:
         project :app > com.google.android.gms:play-services-measurement:17.0.0
         project :app > com.google.android.gms:play-services-measurement-api:17.0.0
         project :app > com.google.android.gms:play-services-measurement-sdk:17.0.0
      > Skipped due to earlier error
      > Skipped due to earlier error
   > Could not resolve com.google.android.gms:play-services-measurement-sdk-api:[17.0.0].
     Required by:
         project :app > com.google.android.gms:play-services-measurement-api:17.0.0
         project :app > com.google.android.gms:play-services-measurement-sdk:17.0.0
      > Skipped due to earlier error
      > Skipped due to earlier error

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

网上查了很多方法、我把这些方案全部列出: 我是方案六解决的

方案一:

在androidStudio的Terminal 运行:

git submodule update --init --recursive 
  • 1

方案二:

将allprojects中的

maven { url ‘https://maven.google.com’ }
  • 1

替换成

  maven { url 'https://dl.google.com/dl/android/maven2/' }
  • 1

方案三:

重启AndroidStudio(这也算方案吗?)

方案四:

切换VPN 重新sync gradle

方案五:

Android Studio的设置中勾选Accept non-trusted certificates automatically

在这里插入图片描述

方案六:

我用的是AndroidStudio4.1.1 升级或降级一下版本
换成4.2.2后问题解决!
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/310973
推荐阅读
相关标签
  

闽ICP备14008679号