Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28.

1、首先进入阿里云maven仓库,在搜索栏输入无法下载的依赖名称,查询现有版本号,可以看到这里有2.9.34。
Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28._第1张图片

2、在build.gradle(Project)的buildscript闭包下替换为阿里云maven仓库:

Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28._第2张图片

maven { url 'https://www.jitpack.io' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }

3、在build.gradle(Project)的allprojects闭包下也替换为阿里云maven仓库:

Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28._第3张图片

4、然后修改build.gradle中的依赖版本,重新sync下载依赖即可。

Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28._第4张图片

即命当荣显,常作落寞想;即时当顺利,当作拂逆想;即眼前足食,常作贫窭想;即人相爱敬,常作恐惧想;即家世望重,常作卑下想;即学问颇优,常作浅陋想。

你可能感兴趣的:(Android经验,github,依赖,gradle,安卓,android,studio)