解决
: Could not find play-services-basement.aar (
com
.google.
android
.gms:play-services-basement:15.0.1).
Searched in the following locations:
https://jcenter.bintray.
com
/
com
/google/
android
/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
最近google 出现不少
问题
1、google 欧洲反垄断罚金
2、
android
系统 手机策略变革
部分goolge依赖也编译不了 ,,,,,,,,,,,
在刚接触
Android
Studio的时候,这玩意整起来确实费劲,现在接触多了,感觉还好,毕竟还有一段提升的空间,以后的必然趋势,所以还是潜心下来好好搞搞。
废话少说,切入正题。
如图所示的error提示,Could not find
com
.
android
.
support
:
app
com
pat
-
v7
:23.1.1,提示我们系统没有找到23.1.1的相应版本的包,也就是说在lib文件夹下面...
ERROR: Unable to resolve dependency for ':
app
@debug/
com
pileClass
pat
h': Could not resolve
com
.
android
.
support
:
app
com
pat
-
v7
:28.0.0.
这个
问题
一般是找不到相关依赖导致的。
问题
出在
app
下的build gradle中指定的
android
sdk的版本,找不到对应的依赖库...
Error:Could not find
com
.
android
.
support
:
app
com
pat
-
v7
:25.3.1.
Required by:
cashking:
app
:unspecified
cashking:
app
:unspecified > cashking:pull_refresh_library:unspecifiedPlease install the
Could not find
com
.
android
.
support
:
app
com
pat
-
v7
:28.0.0-beta01.
Searched in the following locations:
file:/D:/
Android
SDK/extras/m2repository/
com
/
android
/
support
/
app
com
pat
-
v7
/28.0.0-beta01/
app
...
All
com
.
android
.
support
libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions
27.1
.1, 25.3.0. Examples include
com
.
android
.
support
:a...
在build.gradle里面添加一段代码,注意整个项目有两个build.gradle,一个在项目根目录,另一个在
app
-->build.gradle,我们需要选择的是第二个,如图:我们打开这个build.gradle,名字显示的是
app
在里面添加如下代码://
解决
support
-annotations版本冲突configurations.all { resolutionStrate...
Unable to resolve dependency for ‘:
app
@debug/
com
pileClass
pat
h’: Could not resolve
com
.
android
.
support
:
app
com
pat
-
v7
:
27.1
.1
一直以为是网络
问题
,所以折腾了好久的代理
问题
,就是更新不下来,偶然检查gradle配置,在这个文件
C:\Users\cc.gradle\g...
Could not find
com
.
android
.
support
:
app
com
pat
-
v7
:25.3.1.
Required by:
project :sample
project :sample >
com
.yanzhenjie:permission:1.0.7
project :sample >
com
.yanzhenjie.alertdialog:alertdialog:1.0.1
Search in build.g
gradle
问题
处理记录:
Could not find
com
.
android
.
support
:
app
com
pat
-
v7
:28.0.0-alpha3 或
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':
app
:debugRuntimeClass
pat
h'....
Could not find any version that matches
com
.
android
.
support
:
app
com
pat
-
v7
:29.+.
原因1:官方自28之后就不在更新,所以没有29+的版本,所以导入依赖的时候,(至于是开发工具的哪部分负责导入依赖不清楚),找不到29版本的依赖下载,就出错。
原因2:官方后边都是
android
x了,如果象用
com
pileSdkVersion 29
targetSdkVersion 29那么依赖库用这个
android
x,就没有
问题
,如: impleme
1、
解决
方法 – 添加相应的库依赖即可:
implementation ‘
com
.
android
.
support
:
app
com
pat
-
v7
:
27.1
.1’
— The End.