- Home /
Answered 1000 times, and still not solved - CommandInvokationFailure: Failed to re-package resources.
Hi, as the title says, I am stuck on a common building error.
From what I read, it happens from various reasons, and no matter what I tried, I had no luck solving it.
I want to note that I experienced this bug after adding the Facebook SDK in my project.
Why, no idea...
Please take a look at my log, and let me know if you think of something:
Thanks for your time!
*EDIT: Wrong log, lol... I tried to build without api 25 build tools, and shared that log..
CommandInvokationFailure: Failed to re-package resources.
C:\Users\Koks\AppData\Local\Android\sdk\build-tools\25.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Koks/AppData/Local/Android/sdk\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages android.support.graphics.drawable.animated:android.support.v7.appcompat:android.support.v7.appcompat:android.support.v7.cardview:com.chartboost.sdk.unity:android.support.customtabs:com.facebook:com.facebook.android:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.clearcut:com.google.android.gms.gass:com.google.android.gms.tasks:android.support.v4:android.support.v4:android.support.graphics.drawable:com.unity3d.ads.android -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\animated-vector-drawable-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\customtabs-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\facebook-android-sdk-4.17.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.9.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-ads-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-ads-lite-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-base-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-basement-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-clearcut-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-gass-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\play-services-tasks-10.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\support-v4-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\support-v4-24.0.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\support-vector-drawable-23.4.0\res" -S "D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\unityads-release\res"
stderr[
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/abc_alert_dialog_button_bar_material for configuration v17.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/abc_alert_dialog_material for configuration v17.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/abc_dialog_title_material for configuration v17.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/abc_screen_toolbar for configuration v21.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/abc_search_view for configuration v17.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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 co.barakastudio.OkeyDokey:layout/com_facebook_device_auth_dialog_fragment for configuration v16.
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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>
D:\My Unity Games\Hit Em All\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 co.barakastudio.OkeyDokey:layout/com_facebook_smart_device_dialog_fragment for configuration v16.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_big_media for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <ImageView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_big_media_narrow for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:77: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:96: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:64: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_lines for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:43: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <include>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:33: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_media for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <Chronometer>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_part_chronometer for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <DateTimeView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/notification_template_part_time for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/select_dialog_multichoice_material for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource co.barakastudio.OkeyDokey:layout/select_dialog_singlechoice_material for configuration v17.
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <RelativeLayout>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:61: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
D:\My Unity Games\Hit Em All\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: re<message truncated>
Well i do not understand the logs, but something like this happened to me once, and it turns out that 2 plugins from my project imported the same DLL, once i deleted one the game build worked, i don't remember what DLL was, but search for any .dll see if you have duplicates.
Also have you tried to update or reinstall Android SD$$anonymous$$ ? $$anonymous$$aybe some package is missing.
Note, just guessing here, hope it might help.
Sorry I didn't add.
Yea I solved it, I had duplicate versions of few libraries that needed to be deleted. But in fact I did it through a gig on fiver for just 5 dollars.
Sometimes it's worth the time, and plus you get to understand your mistake.
Your answer
Follow this Question
Related Questions
Bugs when I build the game to Windows 1 Answer
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Unity 2017.1 .NET 4.6 Plugin - System.Runtime assembly not allowed to be included? 3 Answers
Building my Game isn't consistent with playing in Unity Engine 0 Answers
Error building Player because scripts had compiler errors 1 Answer