Migrating to AndroidX
Probably one of your dependencies uses androidx.media:media:1.0.0-rc1
. You should use Gradle's Dependency Resolution Strategy to force all dependencies to use the same version.
Try to add the following code in your app level build.gradle
and it should work.
Something like this:
android {
compileSdkVersion 28
defaultConfig {
// Your code
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
// Your build types if any
}
configurations.all {
resolutionStrategy {
force 'androidx.media:media:1.0.0'
}
}
}
You can also use this command to detect which of your dependencies uses androidx.media:media
:
./gradlew :app:dependencies
Refactoring will change old imports to following:
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
You may want to use following instead if you do not plan to use legacy dependencies:
implementation 'androidx.appcompat:appcompat:1.0.0'
This will remove the issue as well if you are not using media at all...