Cannot find version of 'androidx.arch', 'androidx.room', etc
The solution that worked for me was to use a dependency resolution strategy:
So for each item that has been highlighted that the project requires, I have added to my dependency resolution:
configurations.all
{
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-runtime')) {
details.useVersion "2.1.0-alpha04"
}
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-testing')) {
details.useVersion "2.1.0-alpha04"
}
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-rxjava2')) {
details.useVersion "2.1.0-alpha04"
}
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-common')) {
details.useVersion "2.1.0-alpha04"
}
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-migration')) {
details.useVersion "2.1.0-alpha04"
}
if (details.requested.group == 'androidx.room'
&& !details.requested.name.contains('room-compiler')) {
details.useVersion "2.1.0-alpha04"
}
}
}
Here I have stated that they should use version 2.1.0-alpha04 as it seems that version 2.1.0-alpha06 has issues from firsthand experiences as well as stated in another post: Room persistence library (dependency issue), MVVM design pattern and Note: Failed to read get kotlin metadata for ...etc, and type converter