I get an error "CommandInvokationFailure: Failed to re-package resources." when I build android platform with Facebook is integrated.
Hi there, This is my problem, I tried many methods but didn't work.
Tried Unity version: 5.4.5f1 and 5.6 Facebook SDK: 7.9.4
First I built my game on Android, It ran perfectly. Then I have integrated Facebook, It fails to build android, and keep telling me this error:
CommandInvokationFailure: Failed to re-package resources.
When I delete the Facebook's AndroidManifest (In the plugin folder) then I'm able to build android again but no more Facebook SDK.
Please Help me, I attached the error log and the Facebook's Manifest here Thanks in advanced!
CommandInvokationFailure: Failed to re-package resources. F:\android\build-tools\25.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "F:/android\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages android.support.graphics.drawable.animated:android.support.v7.appcompat:android.support.v7.cardview:android.support.customtabs:com.facebook:com.facebook.android:android.support.v4:android.support.graphics.drawable -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\animated-vector-drawable-23.4.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\customtabs-23.4.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.9.4\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\support-v4-23.4.0\res" -S "F:\New Projects\tap dash\Temp\StagingArea\android-libraries\support-vector-drawable-23.4.0\res"
stderr[ F:\New Projects\tap dash\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 F:\New Projects\tap dash\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.tssas.sads:layout/abc_alert_dialog_button_bar_material for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/abc_alert_dialog_material for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/abc_dialog_title_material for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.tssas.sads:layout/abc_screen_toolbar for configuration v21. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/abc_search_view for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_device_auth_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/com_facebook_device_auth_dialog_fragment for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\layout\com_facebook_smart_device_dialog_fragment.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/com_facebook_smart_device_dialog_fragment for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_big_media for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_big_media_narrow for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_lines for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_media for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_part_chronometer for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/notification_template_part_time for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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 F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/select_dialog_multichoice_material for configuration v17. F:\New Projects\tap dash\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 F:\New Projects\tap dash\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:paddingEnd from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource com.tssas.sads:layout/select_dialog_singlechoice_material for configuration v17. F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\drawable\abc_ratingbar_indicator_material.xml:23: note: removing attribute http://schemas.android.com/apk/res/android:tileModeX from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\drawable\abc_ratingbar_indicator_material.xml: note: using v21 attributes; synthesizing resource com.tssas.sads:drawable/abc_ratingbar_indicator_material for configuration v21. F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\drawable\abc_ratingbar_small_material.xml:23: note: removing attribute http://schemas.android.com/apk/res/android:tileModeX from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res\drawable\abc_ratingbar_small_material.xml: note: using v21 attributes; synthesizing resource com.tssas.sads:drawable/abc_ratingbar_small_material for configuration v21. F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\drawable\com_facebook_favicon_blue.xml:21: note: removing attribute http://schemas.android.com/apk/res/android:viewportHeight from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\drawable\com_facebook_favicon_blue.xml:21: note: removing attribute http://schemas.android.com/apk/res/android:viewportWidth from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\drawable\com_facebook_favicon_blue.xml:26: note: removing attribute http://schemas.android.com/apk/res/android:fillColor from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\drawable\com_facebook_favicon_blue.xml:26: note: removing attribute http://schemas.android.com/apk/res/android:pathData from F:\New Projects\tap dash\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res\drawable\com_facebook_favicon_blue.xml: note: using v21 attributes; synthesizing resource com.tssas.sads:drawable/com_facebook_favicon_blue for configuration v21. AndroidManifest.xml:22: Tag attribute authorities has invalid character ' '. ] stdout[ Configurations: (default)
Files: AndroidManifest.xml Src: () AndroidManifest.xml
Resource Dirs: Including resources from package: F:\android\platforms\android-23\android.jar applyFileOverlay for drawable trying overlaySet Key=com_facebook_auth_dialog_background.xml trying overlaySet Key=com_facebook_auth_dialog_cancel_background.xml trying overlaySet Key=com_facebook_auth_dialog_header_background.xml trying overlaySet Key=com_facebook_button_background.xml trying overlaySet Key=com_facebook_button_icon.xml trying overlaySet Key=com_facebook_button_icon_blue.png trying overlaySet Key=com_facebook_button_icon_white.png trying overlaySet Key=com_facebook_button_like_background.xml trying overlaySet Key=com_facebook_button_like_icon_selected.png trying overlaySet Key=com_facebook_button_login_silver_background.xml trying overlaySet Key=com_facebook_button_send_background.xml trying overlaySet Key=com_facebook_button_send_icon_blue.png trying overlaySet Key=com_facebook_button_send_icon_white.png trying overlaySet Key=com_facebook_close.png trying overlaySet Key=com_facebook_favicon_blue.xml trying overlaySet Key=com_facebook_profile_picture_blank_portrait.png trying overlaySet Key=com_facebook_profile_picture_blank_square.png trying overlaySet Key=com_facebook_send_button_icon.xml trying overlayS
Facebook AndroidManifest
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
<activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
<activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
<activity android:name="com.facebook.unity.AppInviteDialogActivity" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fbEAAD6WBYuOLQBAJMfa9VnxgVsMDwzrtUH9P1Xj45qbum6AlCCkFVugATEd9j4WFWKfAvyFZCc6sRVvoFpiOZCUCoxWBTsa9v1co1DnZCxRc9G2aIYbrLRc9qrLZC5xnaHB04cMeSGNyMLRkWI3ci9o4eYxfQPpOwPybpBJ3F2limCQlBNXMmWS2kZC4dTHrtoZD " />
<provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProviderEAAD6WBYuOLQBAJMfa9VnxgVsMDwzrtUH9P1Xj45qbum6AlCCkFVugATEd9j4WFWKfAvyFZCc6sRVvoFpiOZCUCoxWBTsa9v1co1DnZCxRc9G2aIYbrLRc9qrLZC5xnaHB04cMeSGNyMLRkWI3ci9o4eYxfQPpOwPybpBJ3F2limCQlBNXMmWS2kZC4dTHrtoZD " android:exported="true" />
Your answer
Follow this Question
Related Questions
Variable doesn't exist? 0 Answers
Android build error 1 Answer
Error during building 1 Answer
Building for android fails after adding Unity Ads? 0 Answers
Unity Build Error Android Build (SOLVED) 0 Answers