android - gradle配置recyclerview引用是报错,提示安装对应的Support Repository,请问如何解决。
本文介绍了android - gradle配置recyclerview引用是报错,提示安装对应的Support Repository,请问如何解决。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
gradle配置recyclerview引用是报错,提示安装对应的Support Repository,请问如何解决。
我的引用代码如下:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
complie 'com.android.support:recyclerview-v7:25.0.1'
testCompile 'junit:junit:4.12'
}
完整的报错的如下:
Error:Could not find method complie() for arguments [com.android.support:recyclerview-v7:25.0.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager. <a href="openAndroidSdkManager">Open Android SDK Manager</a>
根据提示我安装了所有我觉得有关系的SDK,但是报错还是存在。
解决方案
安卓支持库在 SDK 目录下,版本统一一下即可。
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
这篇关于android - gradle配置recyclerview引用是报错,提示安装对应的Support Repository,请问如何解决。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文