Reputation: 11
I am implementing facebook integration in my project but I am stuck as I add facebook sdk dependency in my project it gives me an error.
When i am going to add facebook sdk dependencies in build.gradle, it gives me error of mixing version.
Upvotes: 0
Views: 396
Reputation: 1370
Try adding the specific Version of the implementation, go to this link https://developers.facebook.com/docs/android/downloads/ and add latest version. If the error still persists you may have to lower the version number. At the time of answering this, 4.31.0 is the latest version, but 4.29.0 worked for me.
Upvotes: 0
Reputation: 363825
The Facebook SDK for Android is using support libraries version 25.3.1, so you have to exclude them to use the most recent support libraries:
Something like:
compile ('com.facebook.android:facebook-android-sdk:4.26.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'customtabs'
}
Otherwise you have to use the support libraries v.25.3.1 instead of 26.+.
Use:
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
...
Upvotes: 2