6

mam ten błąd:Facebook SDK konflikt zależność

enter image description here

Na coraz drzewa zależności, stwierdziliśmy, że nie ma nic złego z animowanymi kanału alfa wektorowej ale ostatni SDK Facebooka posiada poprzednią wersję support-v4 zwyczaju patka. Próbowałem wykluczyć z polecenia grupy wykluczenia, ale nie działa. Oto moje drzewo zależności:

+--- com.facebook.android:facebook-android-sdk:[email protected] 
| +--- com.android.support:support-v4:[email protected] 
| | +--- com.android.support:support-compat:[email protected] 
| | | \--- com.android.support:support-annotations:[email protected] 
| | +--- com.android.support:support-media-compat:[email protected] 
| | | +--- com.android.support:support-annotations:[email protected] 
| | | \--- com.android.support:support-compat:[email protected] 
| | |   \--- com.android.support:support-annotations:[email protected] 
| | +--- com.android.support:support-core-utils:[email protected] 
| | | +--- com.android.support:support-annotations:[email protected] 
| | | \--- com.android.support:support-compat:[email protected] 
| | |   \--- com.android.support:support-annotations:[email protected] 
| | +--- com.android.support:support-core-ui:[email protected] 
| | | +--- com.android.support:support-annotations:[email protected] 
| | | \--- com.android.support:support-compat:[email protected] 
| | |   \--- com.android.support:support-annotations:[email protected] 
| | \--- com.android.support:support-fragment:[email protected] 
| |   +--- com.android.support:support-compat:[email protected] 
| |   | \--- com.android.support:support-annotations:[email protected] 
| |   +--- com.android.support:support-core-ui:[email protected] 
| |   | +--- com.android.support:support-annotations:[email protected] 
| |   | \--- com.android.support:support-compat:[email protected] 
| |   |   \--- com.android.support:support-annotations:[email protected] 
| |   \--- com.android.support:support-core-utils:[email protected] 
| |    +--- com.android.support:support-annotations:[email protected] 
| |    \--- com.android.support:support-compat:[email protected] 
| |     \--- com.android.support:support-annotations:[email protected] 
| +--- com.android.support:appcompat-v7:[email protected] 
| | +--- com.android.support:support-annotations:[email protected] 
| | +--- com.android.support:support-v4:[email protected] 
| | | +--- com.android.support:support-compat:[email protected] 
| | | | \--- com.android.support:support-annotations:[email protected] 
| | | +--- com.android.support:support-media-compat:[email protected] 
| | | | +--- com.android.support:support-annotations:[email protected] 
| | | | \--- com.android.support:support-compat:[email protected] 
| | | |   \--- com.android.support:support-annotations:[email protected] 
| | | +--- com.android.support:support-core-utils:[email protected] 
| | | | +--- com.android.support:support-annotations:[email protected] 
| | | | \--- com.android.support:support-compat:[email protected] 
| | | |   \--- com.android.support:support-annotations:[email protected] 
| | | +--- com.android.support:support-core-ui:[email protected] 
| | | | +--- com.android.support:support-annotations:[email protected] 
| | | | \--- com.android.support:support-compat:[email protected] 
| | | |   \--- com.android.support:support-annotations:[email protected] 
| | | \--- com.android.support:support-fragment:[email protected] 
| | |   +--- com.android.support:support-compat:[email protected] 
| | |   | \--- com.android.support:support-annotations:[email protected] 
| | |   +--- com.android.support:support-core-ui:[email protected] 
| | |   | +--- com.android.support:support-annotations:[email protected] 
| | |   | \--- com.android.support:support-compat:[email protected] 
| | |   |   \--- com.android.support:support-annotations:[email protected] 
| | |   \--- com.android.support:support-core-utils:[email protected] 
| | |    +--- com.android.support:support-annotations:[email protected] 
| | |    \--- com.android.support:support-compat:[email protected] 
| | |     \--- com.android.support:support-annotations:[email protected] 
| | +--- com.android.support:support-vector-drawable:[email protected] 
| | | +--- com.android.support:support-annotations:[email protected] 
| | | \--- com.android.support:support-compat:[email protected] 
| | |   \--- com.android.support:support-annotations:[email protected] 
| | \--- com.android.support:animated-vector-drawable:[email protected] 
| |   +--- com.android.support:support-vector-drawable:[email protected] 
| |   | +--- com.android.support:support-annotations:[email protected] 
| |   | \--- com.android.support:support-compat:[email protected] 
| |   |   \--- com.android.support:support-annotations:[email protected] 
| |   \--- com.android.support:support-core-ui:[email protected] 
| |    +--- com.android.support:support-annotations:[email protected] 
| |    \--- com.android.support:support-compat:[email protected] 
| |     \--- com.android.support:support-annotations:[email protected] 
| +--- com.android.support:cardview-v7:[email protected] 
| | \--- com.android.support:support-annotations:[email protected] 
| +--- com.android.support:customtabs:[email protected] 
| | +--- com.android.support:support-compat:[email protected] 
| | | \--- com.android.support:support-annotations:[email protected] 
| | \--- com.android.support:support-annotations:[email protected] 
| +--- com.parse.bolts:bolts-android:[email protected] 
| | +--- com.parse.bolts:bolts-tasks:[email protected] 
| | \--- com.parse.bolts:bolts-applinks:[email protected] 
| |   \--- com.parse.bolts:bolts-tasks:[email protected] 
| \--- com.google.zxing:core:[email protected] 

Chcę używać najnowszej biblioteki appcompat, ponieważ chcę wspierać Oreo. Czy ktoś może mnie w tym poprowadzić? Czyż nie jest to błąd Facebooka polegający na używaniu starszej zależności dla niestandardowych kart? Dziękuję bardzo za poświęcony czas i pomoc w tej sprawie.

Odpowiedz

14

Facebook SDK for Android korzysta z biblioteki pomocniczej w wersji 25.3.1, więc należy wykluczyć ją, aby korzystać z najnowszej biblioteki pomocy technicznej. Można spróbować przy użyciu następujących:

// 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' 
} 
+0

wielkie dzięki !! Zadziałało. Ale drzewo zależności pokazało, że tylko customtabs było 25.3.1. Dlaczego spanie na facebooku? Dowolny pomysł? –

+0

imho, powyższy kod jest po prostu prosty sposób, aby zapewnić, że konfliktowa biblioteka obsługi nie jest dołączona do facebook sdk w wersji 4.26.0. Możesz spróbować wykluczyć tylko customtabs. Przepraszam, naprawdę nie rozumiem, dlaczego "dlaczego śpimy na facebooku"? Czy mógłbyś to bardziej rozwinąć? –

+0

Próbowałem dla customtabs, które nie działało. Jeśli chodzi o spanie na Facebooku, to tylko żart. Chodzi mi o to, dlaczego nie uaktualnili zależności w swoim SDK. –

10

Dla facebook-android-sdk: 4.28.0 lista jest nieco dłużej;)

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

Jakieś rozwiązanie dla 4.29.0? Pochodzi z 27.0.1, ale ostatnia obsługa to 27.0.2, więc jeśli wyłączysz com.android.support z sdk Facebooka jak w 4.28.0, zwróci to kilka błędów :(-> ... /. Gradle/caches/transforms -1/files-1.1/facebook-common-4.29.0.aar/be3a9d27cd44a8128aadc980156f8f12/res/layout/com_facebook_device_auth_dialog_fragment.xml. Próbowałem usunąć pamięci podręczne z gadżetów, ale nie pomogłem – Pelanes

+0

Właśnie zaktualizowałem fb sdk do 4.30.0 używając obsługuje bibliotekę 27.0.2 i działa idealnie, wystarczy usunąć wszystkie wykluczenia i linie implementacji, więc może zrobić to samo, jeśli jeszcze go nie używasz. –

Powiązane problemy