错误图片
我最近将我的android studio更新为3.0,而我在build.gradle(module.app)中添加了对recycleler视图的依赖,而卡片视图工作正常。它显示了显示的错误.Below是我的依赖代码。
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.m.listviewslow"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
答案 0 :(得分:0)
添加 maven {url' https://maven.google.com'您的项目级build.gradle。。
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
https://developer.android.com/topic/libraries/support-library/setup.html
答案 1 :(得分:0)
像这样编辑你的build.gradle文件
allprojects {
repositories {
jcenter()
google()
}
}