Я полностью перестраиваю старый проект и сохранил только файлы xml
(без ошибок).Я выбрал обновление до androidx и правильно синхронизировал все зависимости, кроме recyclerview
.Всякий раз, когда я пытаюсь выполнить синхронизацию, отображается журнал ошибок, перечисленный ниже.
android:useAndroidX=true
и android:useJetifier=true
оба заданы в файле gradle.properties
.В файле xml
ошибок не обнаружено.Я пытался сделать недействительными кэши / перезапуск, перезагрузить всю систему и очистить проект.На самом деле я не знаю, что еще делать.
Ошибка возникает только тогда, когда я добавляю одну или обе эти зависимости:
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0-alpha05'
Я пытался добавлять и удалять каждую зависимость по отдельности.только те, которые выдавали ошибку.
Ошибка
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx.recyclerview:recyclerview:1.1.0-alpha05.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx.recyclerview:recyclerview-selection:1.1.0- alpha05.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve androidx.recyclerview:recyclerview:1.1.0-alpha05.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve androidx.recyclerview:recyclerview-selection:1.1.0-alpha05.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve androidx.recyclerview:recyclerview:1.1.0-alpha05.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve androidx.recyclerview:recyclerview-selection:1.1.0-alpha05.
Show Details
Affected Modules: app
build.gradle (app) file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.shababuna"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.airbnb.android:lottie:3.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0-alpha05'
}