我正在使用Android Studio SDK版本28,当我进行gradle同步时,出现了三个错误:
Failed to resolve: com.android.support:design:28.1.0
Failed to resolve: com.android.support:recyclerview-v7:28.1.0
Failed to resolve: com.android.support:support-v4:28.1.0`
依赖项:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "android.arch.persistence.room:runtime:1.0.0"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
implementation "android.arch.lifecycle:extensions:1.1.0"
annotationProcessor "android.arch.lifecycle:compiler:1.1.0"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.facebook.stetho:stetho:1.4.2'
implementation 'com.android.support:recyclerview-v7:28.1.0'
implementation 'com.android.support:support-v4:28.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
答案 0 :(得分:1)
这实际上是在说实话。没有28.1.0
可用的依赖项。
将28.0.0
( Latest stable version by now )用于支持库依赖项:
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
它们也应该是相同的版本。
答案 1 :(得分:0)
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
implementation 'com.android.support:support-core-utils:28.0.0'
implementation 'com.android.support:support-core-ui:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-fragment:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'