Could not resolve all files for configuration ':app:debugCompileClasspath'.解决方案
异常如下:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-ads:latest.release.
Required by:
project :app
> Could not resolve com.google.android.gms:play-services-ads:12.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads/12.0.1/play-services-ads-12.0.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads/12.0.1/play-services-ads-12.0.1.pom'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 35s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
解决方案如下:
在project级别下的build.gradle文件中添加如下代码:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1' //这里不用和我一样,和你项目里面的版本一样就行
classpath 'com.google.gms:google-services:4.0.1' //这行对谷歌服务库进行依赖
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral ()
maven {url 'https://dl.bintray.com/jetbrains/anko'} //这是你需要加入的,这个是解决这个问题的关键地方,我就是添加这个maven后不再报上面的错误了
maven {url "https://maven.google.com"} //谷歌广告
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
---------------------
作者:晨诺星空
来源:CSDN
原文:https://blog.csdn.net/wjj1996825/article/details/80900875
版权声明:本文为博主原创文章,转载请附上博文链接!
Could not resolve all files for configuration ':app:debugCompileClasspath'.解决方案的更多相关文章
- Could not resolve all files for configuration;Andriod在build.gradle添加compile files()报错
在build.gradle中添加个 compile files('libs/alipaySdk-20170922.jar') 就一直报这个错误 Error:Could not resolve all ...
- databus编译:Could not resolve all dependencies for configuration ':databus2-relay:databus2-event-producer-mock:compile
FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for c ...
- Could not resolve all dependencies for configuration ':classpath'
我这里是copy过来的项目包名没有修改,导致依赖找不到
- 【Hybrid App】关于Hybrid App技术解决方案的选择
[引言]近年来随着移动设备类型的变多,操作系统的变多,用户需求的增加,对于每个项目启动前,大家都会考虑到的成本,团队成员,技术成熟度,时间,项目需求等一堆的因素.因此,开发App的方案已经变得越来越多 ...
- 没有对“C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files”的写访问权限 的解决方案
问题情况: 在64位机器上运行Web服务,然后在配置好之后测试访问的时候出现如下提示:
- 微信中通过页面(H5)直接打开本地app的解决方案
简述 微信中通过页面直接打开app分为安卓版和IOS版,两个的实现方式是完全不同的. 安卓版实现:使用腾讯的应用宝,只要配置了“微下载”之后,打开链接腾讯会帮你判断本地是否已经安装了app,如果本地安 ...
- js在微信、微博、QQ、Safari唤起App的解决方案
首先看下完整的流程: 简单说下universal link 在iOS9之前,唤起方式和现在安卓是一个的,都是使用scheme进行唤起,这种方式有个小问题,每次唤起,都会给个提示:是否打开xx应用,这样 ...
- H5 唤起 APP的解决方案
H5 页面唤起APP或跳转到下载APP的某个链接地址.总结如下: 在 IOS 中, 系统版本在 8 以下时,可以监听页面的 pagehide / visibilitychange 事件. 系统版本大于 ...
- Electron 发生错误 "Cannot find module app"的解决方案
运行一个electron小demo出现的一个错误信息:Cannot find module app 原代码如下所示: var app = require('app'); var BrowserWind ...
随机推荐
- 3D Computer Grapihcs Using OpenGL - 08 Text File Shaders
使用之前的方法写Shader是一件很痛苦的事情,把Shader代码直接卸载C++文件中,需要使用很多引号来包裹,既不美观也不方便. 我们这节的目的是使用纯文本文件保存Shader. 首先在工程中创建两 ...
- VxWorks BSP开发入门
VxWorks将所有硬件平台相关的代码封装在BSP(Board Support Package)库中,从而为应用层代码提供了独立于硬件平台和体系接口的特性. BSP库中封装了一组统一的API,包括硬件 ...
- 009-Spring Boot 事件监听、监听器配置与方式、spring、Spring boot内置事件
一.概念 1.事件监听的流程 步骤一.自定义事件,一般是继承ApplicationEvent抽象类 步骤二.定义事件监听器,一般是实现ApplicationListener接口 步骤三.启动时,需要将 ...
- 【ABAP系列】SAP ABAP同时显示多个ALV的方法
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP同时显示多个AL ...
- Far and away the best prize that life has given to us is the chance to work hard at work worth doing
work at:侧重于某个工作场所,或者是工作领域内研究 work on:侧重于思想上的从事于某个工作. marvel:n.漫威.奇迹 means.n.方法 tailor.n.裁缝 brighten. ...
- Java{0}占位符替换字符串
Java{0}占位符替换字符串 public class Test { public static void main(String[] args) { System.out.println(Stri ...
- c语言秋季作业1
1:你对软件工程专业或者计算机科学与技术专业了解是怎样? answer:据我上网了解软件工程是一门研究用工程化方法构建和维护有效的.实用的和高质量的软件的学科.它涉及程序设计语言.数据库.软件开发工具 ...
- [Markdown] 04 进阶语法 第二弹
[TOC] 接上一篇 [Mardkown] 03 进阶语法 第一弹 8. LaTeX 8.1 相关介绍 TeX:学术排版 LaTeX:相当于 TeX 的简化版本:对公式编辑精细至像素级别 MathJa ...
- [Python3] 009 字符串:给你们看看我的内置方法 第一弹
目录 前言 如何查看 python3 中和 str 有关的方法 字符串方法 1. capitalize() 2. casefold() 3. center(width) 4. count(sub[, ...
- linux命令了的查找顺序
$PATH,从左到右依次查找. 遇到第一个匹配的命令就立即停止查找.