1

I am using these Dependencies in my android project.

dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:appcompat-v7:25.4.0'
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'com.google.firebase:firebase-auth:11.4.2'
        compile 'com.facebook.android:facebook-android-sdk:4.27'
        compile 'com.android.support:design:25.4.0'
        compile "com.hanks:htextview-evaporate:0.1.1"
        compile 'com.rengwuxian.materialedittext:library:2.1.4'
        compile 'com.google.firebase:firebase-database:11.4.2'
        testCompile 'junit:junit:4.12'
    }

Now the problem is that

  compile 'com.android.support:appcompat-v7:25.4.0'

It is showing me the warning (after updating version of all libraries) like this :

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes)

And when I am removing Facebook Sdk Lib. compile 'com.facebook.android:facebook-android-sdk:4.27' .

Everything works fine but obviously I need it.I dont know what should i do can anyone help me.

Sahdeep Singh
  • 1,342
  • 1
  • 13
  • 34

1 Answers1

1

You are getting error because Facebook Sdk is using another revision of Google support libraries. You need to compile all library which error warn you on mouse hover with same version as your gradle have support library.

Priya
  • 1,602
  • 4
  • 22
  • 37
  • No Just include library which You get in mouse hover and use version v7:25.4.0 as you are using in your gradle. – Priya Nov 03 '17 at 15:39
  • Yes i included them too but doesn't work so i am using v7.25.3.1 which is working perfectly. – Sahdeep Singh Nov 03 '17 at 15:41
  • I have faced similar issue before with another library and it was solved with this way. It should work fine if you include all library which we get in warning and must have same version. Thanks – Priya Nov 03 '17 at 15:43