Android studio升级3.0以后添加依赖失败

昨天升级了一下AS到3.0,感觉是方面有点问题,尤其是依赖加载,我用了BaseRecyclerViewAdapterHelper,GitHub上的一个适配器项目,按照以往AS添加依赖的方法添加

compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.31'

出现问题显示
"Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30. Open File Show Details"
后边折腾了一晚上找到了解决方法,配置project下的gradle文件如下

buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        /*classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'*/
    }
    repositories {
        google()
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }
}
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
    }
}
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值