Solved
[SOLVED] Facebook SDK Error: AndroidManifest.xml Failure
The build was literally working fine until adding the Facebook SDK. I've added other SDKs with no problem, including TUNE marketing.
Now, after adding the Facebook SDK I'm getting this Command Invoke Failure
CommandInvokationFailure: Failed to re-package resources.
C:\Android\sdk2\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Android/sdk2\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages android.support.graphics.drawable.animated:android.support.v7.appcompat:android.support.v7.cardview:
com.unity.purchasing:android.support.customtabs:
com.facebook:
com.facebook.android:
com.android.vending.billing:
com.unity.purchasing.googleplay:
com.google.android.gms.base:
com.google.android.gms:
com.google.android.gms.gcm:
android.support.v4:
android.support.graphics.drawable:
com.unity3d.ads.android -S "C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\animated-vector-drawable-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\common\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\customtabs-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.9.4\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\GoogleAIDL\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\GooglePlay\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\play-services-base-8.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\play-services-basement-8.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\play-services-gcm-8.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\support-v4-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\support-vector-drawable-23.4.0\res" -S
"C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\unityads-release\res"
stderr[
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/abc_alert_dialog_button_bar_material for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/abc_alert_dialog_material for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/abc_dialog_title_material for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/abc_screen_toolbar for configuration v21.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/abc_search_view for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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\Trey Van Zandt\Desktop\Ninja Surf - Facebook\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.Archelyte.NinjaSurf:layout/com_facebook_device_auth_dialog_fragment for configuration v16.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:136: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from <Button>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:112: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:112: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:59: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <android.support.v7.widget.AppCompatImageView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml: note: using v16 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/com_facebook_smart_device_dialog_fragment for configuration v16.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_big_media for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <ImageView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_big_media_narrow for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml:77: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml:96: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml:64: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_lines for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_media.xml:43: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <include>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_media.xml:33: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_media for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_chronometer.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <Chronometer>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_part_chronometer for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_time.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <DateTimeView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/notification_template_part_time for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.Archelyte.NinjaSurf:layout/select_dialog_multichoice_material for configuration v17.
C:\Users\Trey Van Zandt\Desktop\Ninja Surf - Facebook\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
C:\Users\Trey Van Zandt\Des<message truncated>
Answer by archelyte_vz · May 08, 2017 at 07:20 PM
SOLVED:
There was more than one issue going on here. All of what was needed to resolve the issue can be found in these links:
http://answers.unity3d.com/questions/1170355/failed-to-re-package-resources-facebook-sdk.html
http://answers.unity3d.com/questions/1099627/why-the-facebook-sdk-unable-to-merge-android-manif.html
http://answers.unity3d.com/questions/1115040/unable-to-convert-classes-into-dex-format-please-h.html
really annoying to follow up links like that. the answer should be written here to help others.
I'm sorry, but I disagree with you. There were too many errors, and the answer would have been too long. If a person can't be bothered to burn maybe 2 calories clicking to follow 3 links, then they really don't want their answer.
The links are to other answers here on Unity's forums, so they do help, especially since they address each problem that caused this error.
I stand by my decision to use these links.
It also gives credit to the original people who posted the solution. Unlikely that people would bother to go check them out if the answer were just listed here with their names attributed.
Follow this Question
Related Questions
Unity Facebook SDK - Scores Paging and Pagination 0 Answers
build android problem 1 Answer
Facebook SDK 7.8 Invalid Hash key 2 Answers
Facebook SDK for CPI tracking 0 Answers
[HELP URGENT] Resolving dependencies. 0 Answers