i am trying android WorkManager, The code is throwing error \"More than one file was found with OS independent path \'META-INF/proguard/androidx-annotations.pro
As a beginner, I had this issue while using a pre-made project for in some tutorial, and above solution didn't work for me.
So in case someone face same problem.
I had to upgrade gradle version in build.gradle
file for project:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
}
}
...
Then I had to upgrade gradle wrapper in gradle-wrapper.properties
:
#Wed Sep 26 11:30:41 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
# Delete this
#distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
# Add this
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Then, I set useAndroidX
to true in gradle.properties
file:
android.useAndroidX=true
That's it. I hope it helps.