After upgrading the code, I am getting an error "Failed to resolve: support-media-compat Open File". The supportlib_version is 27.1.1
Asked
Active
Viewed 2,478 times
2
-
it is due to your different versions of libraries in gradle file. All android supp libraries should have the same api version. please check those versions – Umair Dec 03 '18 at 04:43
-
I think I have given 27.1.1 for all support libraries. – Droid Genie Dec 03 '18 at 04:44
-
2can you post your complete .gradle file ? – Umair Dec 03 '18 at 04:47
2 Answers
9
I had the same issue after adding implementation 'com.android.support:support-v4:27.1.1' and solved it by making google() before jcenter() as mentioned here Failed to resolve: com.android.support:appcompat-v7:27.+ (Dependency Error)

Hasan El-Hefnawy
- 1,249
- 1
- 14
- 20
-
1i change google() before jcenter() in **allprojects** work for me! – user3898288 Sep 20 '19 at 10:00
0
I had similar problem for different implementation
allprojects {
repositories {
maven {url "https://maven.google.com"}
}
}
After adding this code in project level gradle, it worked

Praful C
- 162
- 1
- 3
- 14