9

In my project dependencies android.support:appcompat-v7:27.1.1 but its clashing with support-media-compat: 25.2.0. i tried to slove it by changing appcompat-v7:25.+ , 25.2.0 and others but its not fixed. Even i don't find media-compat in gradle or anywhere.

Please help me to fix it. Now I can't run my project on AVD or USB connected phone. Here is my android studio interface

[When i rebuild my project its says All fine but when i tried to run the project it gives some error[2]

Michał Turczyn
  • 32,028
  • 14
  • 47
  • 69
Saraf Uddin
  • 93
  • 1
  • 5

3 Answers3

19

I had the same problem when adding Firebase invites. I solved by adding this to dependencies, following this link.

implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'

According to the post, the error is misguiding. The problem is not a dependency conflict but the lack of the dependency package. But i am not sure of this interpretation, anyway, it works.

MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
0

Quite possibly a lib you are using might depend on it. Check your dependency tree using the gradle task app:dependencies.

More info can be found in this answer Using gradle to find dependency tree

Ch Vas
  • 993
  • 8
  • 10
0

You should only need to update your Google Services to the latest version. Change the version in App gradle.

        classpath 'com.google.gms:google-services:4.0.2'