开发错误记录5:Failed to resolve: com
2016-04-11 15:27
686 查看
今在导入项目时报:Failed to resolve: com.android.support:appcompat-v7:23.1.1包!
一、按F12查看包引用情况
v7包版本不一样,环境中只有com.android.support:appcompat-v7:23.0.0!
二、更改版本号23.0.0,Rebuild project,报错如下:
提示为无法找到 com.android.support:appcompat-v7:23.1.1包,这说明gradle中仓库地址无 法下载相关的依赖包。
三、更改gradle仓库为mavenCentral():
四、Rebuild project通过,编译时再报错:
提示在mavenCentral()仓库中没有com.victor:lib:1.0.4该包,表明无法自动下载依赖包,只得手动下载。
五、在浏览器下载:
报不存在 jar包,然后浏览目录也无法找到。
六、换成https://jcenter.bintray.com/ 下载 .aar文件(因无.jar文件):
.aar文件与jar文件区别:
七、在工程中引用 aar包;(与引用jar包不同)
①.将aar包复制到lib目录下
②.配置build.gradle文件:
加入
repositories {
flatDir {
dirs 'libs'
}
compile(name:'arr文件名', ext:'aar')
完整配置如下:
最后项目编译全通过!
来自为知笔记(Wiz)
一、按F12查看包引用情况
v7包版本不一样,环境中只有com.android.support:appcompat-v7:23.0.0!
二、更改版本号23.0.0,Rebuild project,报错如下:
提示为无法找到 com.android.support:appcompat-v7:23.1.1包,这说明gradle中仓库地址无 法下载相关的依赖包。
三、更改gradle仓库为mavenCentral():
四、Rebuild project通过,编译时再报错:
提示在mavenCentral()仓库中没有com.victor:lib:1.0.4该包,表明无法自动下载依赖包,只得手动下载。
五、在浏览器下载:
报不存在 jar包,然后浏览目录也无法找到。
六、换成https://jcenter.bintray.com/ 下载 .aar文件(因无.jar文件):
.aar文件与jar文件区别:
七、在工程中引用 aar包;(与引用jar包不同)
①.将aar包复制到lib目录下
②.配置build.gradle文件:
加入
repositories {
flatDir {
dirs 'libs'
}
compile(name:'arr文件名', ext:'aar')
完整配置如下:
最后项目编译全通过!
来自为知笔记(Wiz)
相关文章推荐
- 调用 webservice 出现:WSDLReader:Loading of the WSDL file failed HRESULT=0×80040154: 没有注册类别 解决方案
- open(\"/dev/graphics/fb0\") failed!
- 自定义View时,用到Paint Canvas的一些温故,讲讲用路径绘画实现动画效果(基础篇 三)
- 自定义View时,用到Paint Canvas的一些温故,讲讲用路径绘画实现动画效果(基础篇 三)
- 配置Mailgraph_ext,使用Extman的图形日志
- LeetCode OJ 219.Contains Duplicate 2
- https请求 CFNetwork SSLHandshake failed (-9807) A connection failure occurred: SSL problem
- LeetCode OJ 217.Contains Duplicate
- Failed reading log event, reconnecting to retry
- Markov Chain(bate)
- 关于 Gradle failed: already disposed module 的问题
- maertSataDmorfnaideMdniF.295
- ZOJ 3780 Paint the Grid Again-贪心模拟/拓扑排序
- AIDL
- 下一代机器学习-在浏览器中训练深度学习模型Next Generation Machine Learning - Training Deep Learning Models in a Browser
- trail particle制作血管
- leetcode 11 Container With Most Water
- Argument list too long: recursive header expansion failed at
- RAID知识讲解
- LeetCode 11. Container With Most Water