CommandInvokationFailure: Failed to re-package resources with Android and Facebook sdk?

I have attempted reinstalling unity, the android sdk, the facebook sdk, and even the jdk. I can’t figure out this error. The only external tools I have only implemented are the Facebook sdk and in my project is the Appodeal sdk but I haven’t used or implemented it anywhere yet so I didn’t think this would cause any issues. I noticed in the error there is mentions of google play services however I’ve not done implementation of this in my project thus far so I’m not sure where this comes from and if it’s related to Facebook (or perhaps Appodeal).I’ve seen the many posts by other users on this error (or similar ones) but I can’t seem to find a duplicate jar that people seem to claim is the culprit and I don’t know where to begin searching if it is a duplicate class within one of the jar files.

Here is the truncated error I’m receiving from the console,

CommandInvokationFailure: Failed to
re-package resources.
C:\Users\Cole\AppData\Local\Android\sdk1\build-tools\23.0.3\aapt.exe
package --auto-add-overlay -v -f -m -J
gen -M AndroidManifest.xml -S “res” -I
“C:/Users/Cole/AppData/Local/Android/sdk1\platforms\android-23\android.jar”
-F bin/resources.ap_ --extra-packages android.support.v7.cardview:com.facebook:com.facebook:com.facebook.android:com.facebook.android:com.google.android.gms:android.support.v4:com.unity3d.ads.android
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.13.2\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.6.0\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.7.0\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\support-v4-23.4.0\res”
-S “C:\Users\Cole\Documents\Werepigs In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res”

stderr[
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\layout\com_facebook_device_auth_dialog_fragment.xml:117:
note: removing attribute
http://schemas.android.com/apk/res/android:fontFamily
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\layout\com_facebook_device_auth_dialog_fragment.xml:88:
note: removing attribute
http://schemas.android.com/apk/res/android:fontFamily
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\layout\com_facebook_device_auth_dialog_fragment.xml:70:
note: removing attribute
http://schemas.android.com/apk/res/android:fontFamily
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\layout\com_facebook_device_auth_dialog_fragment.xml:56:
note: removing attribute
http://schemas.android.com/apk/res/android:fontFamily
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\layout\com_facebook_device_auth_dialog_fragment.xml:
note: using v16 attributes;
synthesizing resource
com.colechittim.werepigs:layout/com_facebook_device_auth_dialog_fragment
for configuration v16.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_powered_by_google.xml:28:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_toEndOf
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_powered_by_google.xml:28:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_powered_by_google.xml:8:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_powered_by_google.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/place_autocomplete_item_powered_by_google
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_prediction.xml:52:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_toEndOf
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_prediction.xml:35:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_toEndOf
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_prediction.xml:8:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_item_prediction.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/place_autocomplete_item_prediction
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_progress.xml:2:
note: removing attribute
http://schemas.android.com/apk/res/android:indeterminateTint
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_progress.xml:2:
note: removing attribute
http://schemas.android.com/apk/res/android:indeterminateTintMode
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\google-play-services_lib\res\layout\place_autocomplete_progress.xml:
note: using v21 attributes;
synthesizing resource
com.colechittim.werepigs:layout/place_autocomplete_progress
for configuration v21.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:2:
note: removing attribute
http://schemas.android.com/apk/res/android:paddingStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:61:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:27:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:27:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:52:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:44:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:19:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:10:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/unityads_button_audio_toggle
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml:8:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/unityads_button_pause
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:92:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:57:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:57:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:44:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:29:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/unityads_view_video_play
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:92:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:57:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_alignParentEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:57:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:44:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginEnd
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:29:
note: removing attribute
http://schemas.android.com/apk/res/android:layout_marginStart
from C:\Users\Cole\Documents\Werepigs
In Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml:
note: using v17 attributes;
synthesizing resource
com.colechittim.werepigs:layout/unityads_view_video_play2
for configuration v17.
C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_foreground_color” has
already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_object_id” has already
been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_object_type” has already
been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute “com_facebook_style”
has already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_auxiliary_view_position”
has already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_horizontal_alignment”
has already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:22:
error: Attribute
“com_facebook_confirm_logout” has
already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:22:
error: Attribute
“com_facebook_login_text” has already
been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:22:
error: Attribute
“com_facebook_logout_text” has already
been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:22:
error: Attribute
“com_facebook_tooltip_mode” has
already been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:23:
error: Attribute
“com_facebook_preset_size” has already
been defined

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res\values\values.xml:23:
error: Attribute
“com_facebook_is_cropped” has already
been defined

] stdout[ Configurations: (default)

Files:
drawable\unityads_background_button_pause.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_background_button_pause.xml
drawable\unityads_icon_play.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_play.xml
drawable\unityads_icon_speaker_base.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_base.xml
drawable\unityads_icon_speaker_triangle.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_triangle.xml
drawable\unityads_icon_speaker_waves.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_waves.xml
layout\unityads_button_audio_toggle.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml
layout\unityads_button_pause.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml
layout\unityads_view_video_paused.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_paused.xml
layout\unityads_view_video_play.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml
layout\unityads_view_video_play2.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play2.xml
values\values.xml
Src: () C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\unityads\res\values\values.xml
AndroidManifest.xml
Src: () AndroidManifest.xml

Res

If any other information is needed to help find the solution to this issue, I will do my best to provide it. Any help is greatly appreciated. I apologize if I’ve missed an obvious solution and this post is redundant but I’ve been struggling with this for over 3 hours now =p

The issue is that you’re defining the same resource ID multiple times.
You can see that in the error message you attached, for example:

C:\Users\Cole\Documents\Werepigs In
Space V
Reborn\Temp\StagingArea\android-libraries\facebook-
android-sdk-4.12.1\res\values\values.xml:21:
error: Attribute
“com_facebook_foreground_color” has
already been defined

Is it possible that you have included the Facebook plugin multiple times in your project?