赞
踩
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
网上查了很多方法、我把这些方案全部列出: 我是方案六解决的
在androidStudio的Terminal 运行:
git submodule update --init --recursive
将allprojects中的
maven { url ‘https://maven.google.com’ }
替换成
maven { url 'https://dl.google.com/dl/android/maven2/' }
重启AndroidStudio(这也算方案吗?)
切换VPN 重新sync gradle
Android Studio的设置中勾选Accept non-trusted certificates automatically
我用的是AndroidStudio4.1.1 升级或降级一下版本
换成4.2.2后问题解决!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。