Facebook SDK dependency conflict

戏子无情 提交于 2019-11-28 09:09:15

Facebook SDK for Android is using support library version 25.3.1, so you need to exclude it to use the most recent support library. You can try using the following:

// Facebook SDK Dependencies, need to be excluded.
// compile 'com.android.support:support-v4:25.3.1'
// compile 'com.android.support:appcompat-v7:25.3.1'
// compile 'com.android.support:cardview-v7:25.3.1'
// compile 'com.android.support:customtabs:25.3.1'

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'
}

For facebook-android-sdk:4.28.0 the list is a bit longer ;)

implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.android.support:support-annotations:26.1.0'
implementation 'com.android.support:support-core-utils:26.1.0'
implementation('com.facebook.android:facebook-android-sdk:4.28.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'
    exclude group: 'com.android.support', module: 'support-annotations'
    exclude group: 'com.android.support', module: 'support-core-utils'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!