- Home /
The question is answered, right answer was accepted
Facebook SDK error because Duplicate Library with difference Version
Hi, I'm creating game with admob in it and using facebook SDK. Before importing facebook SDK, everything is fine. But, after I imported it I can't build an apk. The cause is because admob using these library: - appcompat-v7-23.1.1 - support-annotations-23.1.1 - support-v4-23.1.1 while facebook SDK using the same library with different version (23.4.0 to be exact).
This is the error log
Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\animated-vector-drawable-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\common\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\customtabs-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.9.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\GoogleAIDL\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\GooglePlay\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-ads-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-ads-lite-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-base-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-basement-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-clearcut-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-gass-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\play-services-tasks-9.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\support-v4-23.1.1\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\support-v4-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\support-vector-drawable-23.4.0\res" -S "C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\unityads-release\res"
stderr[
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <android.support.v7.widget.ButtonBarLayout>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/abc_alert_dialog_button_bar_material for configuration v17.
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml:48: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <android.support.v7.widget.DialogTitle>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/abc_alert_dialog_material for configuration v17.
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/abc_dialog_title_material for configuration v17.
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:touchscreenBlocksFocus from <android.support.v7.widget.ActionBarContainer>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/abc_screen_toolbar for configuration v21.
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/abc_search_view for configuration v17.
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:100: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from <Button>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:80: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from <TextView>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml:56: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from <TextView>
C:\Users\Crew\Documents\Source Tree\quiz-iseng-kaesang\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml: note: using v16 attributes; synthesizing resource com.agatestudio.quizkaesang:layout/com_facebook_device_auth_dialog_fragment for configuration v16.
I already tried that but didn't work. Earlier I tried to remove every library in Facebook SD$$anonymous$$ folder one by one. When I deleted facebook-android-wrapper-7.9.0.aar the build is success so I think this library is the cause.
EDIT: never$$anonymous$$d, I forgot to delete support-annotations and support-v4 at facebook's side
Follow this Question
Related Questions
Error while building; manifest merger failed with multiple errors see logs 1 Answer
Gathering install data (tracking conversions) from Admob and Facebook Ads. Help? 0 Answers
Unable to convert classes into dex format with Unity 5.3.4f1, Admob,Facebook and Unity IAP 0 Answers
Facebook SDK + Admob build Error 0 Answers