昨天升级了一下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"
}
}
}