The first step is to look at what dependencies exist in the project:
Gradlew :app:dependencies — Configuration releaseCompileClasspath
The second step is to add it directly to the allProjects node in the build.gradle file in the project directory
Def lifecycle_version = "2.2.0" def fragment_version = "1.2.0" def exifinterface_version = "1.2.0" def Transition_version = "1.2.0" configurations. All {resolutionStrategy. Force 'androidx. Annotation: an annotation: 1.1.0' resolutionStrategy.force "androidx.lifecycle:lifecycle-common:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" resolutionStrategy.force "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" resolutionStrategy.force "androidx.fragment:fragment:$fragment_version" resolutionStrategy.force "androidx.exifinterface:exifinterface:$exifinterface_version" resolutionStrategy.force "androidx.transition:transition:$transition_version" }Copy the code