Issue
A week ago the app was running perfectly but all of a sudden (without updating anything) the app is not running.
I am getting this error when I try to run the app
The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-30). Dependency: androidx.work:work-runtime:2.7.0-beta01. AAR metadata file: /home/kishan/.gradle/caches/transforms-2/files-2.1/af85edd7f0482dfc2b2e0c9a0519784e/work-runtime-2.7.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
Here is the screenshot for the same:
From my app level gradle file, I can see that I am having
compileSdkVersion 30
and targetSdkVersion 30
Not sure what is causing this issue.
Any help would be appreciated. Thank You!
Solution
Ok So finally I resolve this issue.
The issue was because of the dependency androidx.work:work-runtime
But I would like to first mention that I was not using that dependency in my project directly (not added in my app level gradle), probably some other dependency was using that internally.
So what I did is forcefully downgraded its version by adding this
configurations.all {
resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
}
inside
android {
defaultConfig {
//here
}
}
and it resolved my issue.
Answered By - Kishan Solanki
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.