Android 卡在Gradle:Resolve dependencies':app:_debugCompile'
来源:互联网 发布:新西兰留学知乎 编辑:程序博客网 时间:2024/06/05 21:08
Android 卡在Gradle:Resolve dependencies’:app:_debugCompile’
的原因为Gradle默认每次编译都会resolve dependencies,每次都会去进行网络请求。
所以有两种方案可以解决该问题,一是网络请求步骤加快;二是不通过网络,使用本地文件。
1. 网络
resolve dependencies过慢,最大原因是访问库的速度太慢了,有可能是私有库地址访问太慢,也有可能是公共库,其中JCenter国内可能下载比较慢,所以推荐几个镜像库:
在工程下的build.gradle
里面设置一下内容
allprojects { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } ······ }}
这里设置了阿里云的maven库,速度测试还非常不错。
另外还有两个 http://mirrors.ibiblio.org/maven2/
http://maven.oschina.net/content/groups/public/
自测发现速度慢,所以不推荐使用。
2. 本地
offline模式下,需要保证所有的库已经正确下载完整,可以更改为offline模式。
另外命令执行gradle task的时候,也会出现该情况,所以这个时候,执行命令的时候后面加入–offline就可以了。
如: user$ ./gradlew makeJar --offline
阅读全文
0 0
- Android 新建工程 卡在Gradle:Resolve dependencies':app:_debugCompile'
- Android 卡在Gradle:Resolve dependencies':app:_debugCompile'
- 解决Android Studio卡在Gradle:Resolve dependecies 'app:_debugCompile'问题
- as加载工程卡在Gradle:Resolve dependencies'app:debugCompile'
- Android Studio 打开工程卡在‘Gradle:Resolvedependencies':app:_debugCompile' 问题
- 解决android studio3.0 preview一直卡在Gradle:Resolve dependencies':classpath'的问题
- 解决ionic编译android支持问题> Could not resolve all dependencies for configuration ':_debugCompile'. > Co
- android studio中出现gradle编译失败: Could not resolve all dependencies for configuration ':app:_debugApkCop
- could not resolve all dependencies for configuration ' _debugcompile 错误
- Could not resolve all dependencies for configuration ':XXX:_debugCompile'
- AndroidStudio Gradle:Resolvedependencies':app:_debugCompile' 问题解决纪录
- AndroidStudio Gradle:Resolvedependencies':app:_debugCompile' 问题
- [Android Studio] Gradle fails to resolve dependencies in Android Studio
- android studio 解决Gradle :Resolve dependencies :classpath的办法
- android studio 3.0 preview 解决Gradle: Configure Project or Gradle: Resolve Dependencies ':classpath
- Android Studio Error 安装后Gradle:resolve dependencies:'classpath'问题解决方法
- android gradle dependencies
- Android Studio Gradle Dependencies
- java线程安全问题之静态变量、实例变量、局部变量
- Instant Run performed a full build and install since the installation on the device does not match t
- 野指针和空指针
- 采购员的烦恼(buying)--解法
- POJ 3660 Cow Contest floyd求传递闭包 || bfs
- Android 卡在Gradle:Resolve dependencies':app:_debugCompile'
- handler的使用详解+http联网
- 网站开发(七)数据库的建表与连接
- 【poj 2406】 Power Strings 【KMP 求最小循环节】
- vue+element-ui打包时候出现 UglifyJs Unexpected token: punc 问题
- redux-组合函数(compose)理解
- Spring框架入手学习(二)
- 为什么Java中1000==1000为false而100==100为true?
- Android的Input流程分析(好文)