I'm completely rebuilding an old project, and have only kept the xml
files (which show no error). I chose to update to androidx, and have synced all dependencies correctly, except for recyclerview
. Whenever I try to sync, it would show the error log listed below.
android:useAndroidX=true
and android:useJetifier=true
are both set in gradle.properties
file. No errors were detected in any xml
file. I triedd Invalidating caches/restarting, rebooting the whole system, and cleaning the project. I actually don't know what else to do.
The error is happening only when I add one or both these dependencies:
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0-alpha05'
I tried adding and removing each dependency individually. only those produced the error.
Error
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'
}