- Home /
Android - Failed to repackage resources error after installing facebook plugin
Things run fine in the editor. However, every time I try to generate an android build, I get this error. Does someone know what is happening ?
This wasn't happening before i decided to integrate facebook on the game.
CommandInvokationFailure: Failed to re-package resources.
C:\Android SDK\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Android SDK\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages android.support.v7.cardview:com.unity.purchasing:com.facebook.android:com.facebook:com.facebook.android:com.unity.purchasing.googleplay:android.support.v4:com.unity3d.ads.android -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\cardview-v7-23.4.0\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\common\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook-android-sdk-4.12.1\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.6.0\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\GooglePlay\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\support-v4-23.4.0\res" -S "C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res"
stderr[
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-hdpi\com_facebook_button_like_background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable\com_facebook_button_like_background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xhdpi\com_facebook_button_like_background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xxhdpi\com_facebook_button_like_background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable\com_facebook_button_like_background_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-hdpi\com_facebook_button_like_background_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xhdpi\com_facebook_button_like_background_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xxhdpi\com_facebook_button_like_background_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable\com_facebook_button_like_icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-hdpi\com_facebook_button_like_icon.png: libpng warning: iCCP: Not recognC:\Users\Rusiton\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-lzingibraries\facebook\res\drawable-xhdpi\com_facebook_button_like_icon.png: libpng warning: kinoCCP: Not recognizing known sRGB profile that haswn been edited
sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xxhdpi\com_facebook_button_like_icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable\com_facebook_button_like_icon_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-hdpi\com_facebook_button_like_icon_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xhdpi\com_facebook_button_like_icon_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xxhdpi\com_facebook_button_like_icon_selected.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable\com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-ldpi\com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-hdpi\com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\facebook\res\drawable-xhdpi\com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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 <Button>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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 <TextView>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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 <TextView>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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 <TextView>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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.RDCreativeEntertainment.MonsterStomp:layout/com_facebook_device_auth_dialog_fragment for configuration v16.
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\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>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <RelativeLayout>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <RelativeLayout>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:52: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <View>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:10: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml: note: using v17 attributes; synthesizing resource com.RDCreativeEntertainment.MonsterStomp:layout/unityads_button_audio_toggle for configuration v17.
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml: note: using v17 attributes; synthesizing resource com.RDCreativeEntertainment.MonsterStomp:layout/unityads_button_pause for configuration v17.
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:92: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <include>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <LinearLayout>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <LinearLayout>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml: note: using v17 attributes; synthesizing resource com.RDCreativeEntertainment.MonsterStomp:layout/unityads_view_video_play for configuration v17.
res\drawable\com_facebook_button_like_background.xml:0: error: Resource entry com_facebook_button_like_background is already defined.
res\drawable\com_facebook_button_like_background.png:0: Originally defined here.
]
stdout[
Configurations:
(default)
Files:
drawable\unityads_background_button_pause.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_background_button_pause.xml
drawable\unityads_icon_play.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_play.xml
drawable\unityads_icon_speaker_base.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_base.xml
drawable\unityads_icon_speaker_triangle.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_triangle.xml
drawable\unityads_icon_speaker_waves.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_waves.xml
layout\unityads_button_audio_toggle.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml
layout\unityads_button_pause.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml
layout\unityads_view_video_paused.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_paused.xml
layout\unityads_view_video_play.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml
values\values.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\values\values.xml
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Type drawable
drawable\unityads_background_button_pause.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_background_button_pause.xml
drawable\unityads_icon_play.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_play.xml
drawable\unityads_icon_speaker_base.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_base.xml
drawable\unityads_icon_speaker_triangle.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_triangle.xml
drawable\unityads_icon_speaker_waves.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_icon_speaker_waves.xml
Type layout
layout\unityads_button_audio_toggle.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml
layout\unityads_button_pause.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml
layout\unityads_view_video_paused.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_paused.xml
layout\unityads_view_video_play.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml
Type values
values\values.xml
Src: () C:\Users\Ruston\Desktop\Monster Stomp - Facebook\Temp\StagingArea\android-libraries\unityads-release\res\values\values.xml
Including resources from package: C:\Android SDK\platforms\android-24\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
Answer by Bladynator · Aug 06, 2016 at 02:01 PM
Make sure you login with your keyname and password everytime you reopen Unity/Build your game. You can login on the bottom at: Preferences --> Player Settings
Answer by liortal · Sep 02, 2016 at 09:18 AM
The error can be seen in the message you posted:
res\drawable\com_facebook_button_like_background.xml:0: error: Resource entry com_facebook_button_like_background is already defined.
In your project, you have the same Android resource defined more than once (the resource is called com_facebook_button_like_background).
This means that, somehow you have 2 copies of the same library or resource files in your project. Removing this duplication should fix the issue. The challenge is to look for this duplication and to find it.
In case you're not able to fix this yourself, you could have a look at this service that will help you with fixing it.