Facebook-sdk-for-unity: Can't build for android (re-package error)

Created on 16 Jan 2018  ·  6Comments  ·  Source: facebook/facebook-sdk-for-unity

I added the Facebook SDK to my project and now I can't build anymore.
Have no admob or google play services in the project.

Unity 2017.1.1f1 and Facebook SDK 7.10.1

The error message I get is the following:

`CommandInvokationFailure: Failed to re-package resources.
D:\Programmieren\Zubehör\Android SDK\build-tools\25.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "D:/Programmieren/Zubehör/Android SDK\platforms\android-26\android.jar" -F bin/resources.ap_ --extra-packages com.facebook:com.facebook.android -S "E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res" -S "E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.10.1\res"

stderr[
E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\values\values.xml:131: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar'.

E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\values\values.xml:136: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Dialog'.

]
stdout[
Configurations:
(default)

Files:
AndroidManifest.xml
Src: () AndroidManifest.xml

Resource Dirs:
Including resources from package: D:\Programmieren\Zubeh�r\Android SDK\platforms\android-26\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_background.xml
trying overlaySet Key=com_facebook_button_login_logo.xml
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 overlaySet Key=com_facebook_tooltip_black_background.9.png
trying overlaySet Key=com_facebook_tooltip_black_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_black_topnub.png
trying overlaySet Key=com_facebook_tooltip_black_xout.png
trying overlaySet Key=com_facebook_tooltip_blue_background.9.png
trying overlaySet Key=com_facebook_tooltip_blue_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_blue_topnub.png
trying overlaySet Key=com_facebook_tooltip_blue_xout.png
trying overlaySet Key=messenger_bubble_large_blue.png
trying overlaySet Key=messenger_bubble_large_white.png
trying overlaySet Key=messenger_bubble_small_blue.png
trying overlaySet Key=messenger_bubble_small_white.png
trying overlaySet Key=messenger_button_blue_bg_round.xml
trying overlaySet Key=messenger_button_blue_bg_selector.xml
trying overlaySet Key=messenger_button_send_round_shadow.png
trying overlaySet Key=messenger_button_white_bg_round.xml
trying overlaySet Key=messenger_button_white_bg_selector.xml
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
trying overlaySet Key=com_facebook_activity_layout.xml
trying overlaySet Key=com_facebook_device_auth_dialog_fragment.xml
trying overlaySet Key=com_facebook_login_fragment.xml
trying overlaySet Key=com_facebook_smart_device_dialog_fragment.xml
trying overlaySet Key=com_facebook_tooltip_bubble.xml
trying overlaySet Key=messenger_button_send_blue_large.xml
trying overlaySet Key=messenger_button_send_blue_round.xml
trying overlaySet Key=messenger_button_send_blue_small.xml
trying overlaySet Key=messenger_button_send_white_large.xml
trying overlaySet Key=messenger_button_send_white_round.xml
trying overlaySet Key=messenger_button_send_white_small.xml
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
trying overlaySet Key=com_facebook_button_text_color.xml
trying overlaySet Key=com_facebook_send_button_text_color.xml
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res\drawable-ldpi\app_icon.png
Processing image: res\drawable-mdpi\app_icon.png
Processing image: res\drawable-hdpi\app_icon.png
Processing image: res\drawable-xhdpi\app_icon.png
(processed image res\drawable-ldpi\app_icon.png: 99% size of source)
Processing image: res\drawable-xxhdpi\app_icon.png
(processed image res\drawable-mdpi\app_icon.png: 99% size of source)
Processing image: res\drawable-xxxhdpi\app_icon.png
(processed image res\drawable-hdpi\app_icon.png: 98% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png
(processed image res\drawable-xhdpi\app_icon.png: 97% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png
(processed image res\drawable-xxhdpi\app_icon.png: 96% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png
(processed image res\drawable-xxxhdpi\app_icon.png: 95% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png: 30% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png: 23% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png: 22% size of source)
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_icon_white.png: 161% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_icon_white.png: 157% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png: 14% size of source)
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png: Pro162% size of source)
cessing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png: 157% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png: 147% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png: 60% size of source)
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png: 132% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png: 125% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png: 114% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png: 64% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png: 75% size of source)
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png: 89% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png: 136% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_close.png
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_close.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png: 128% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_close.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_close.png: 118% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_portrait.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png: 109% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_square.png
(processed image E:\Prog r a m m(iperroecne\sCse#d\ wiomragkes paceEs:\IPcre oSglriadmemrie\rUneint\yC3#d\wIocrek sSpalciedse\rI\ceT eSmlpi\dSetra\gUinnigtAyr3eda\Icaen dSrloiidd-elri\bTremapr\iSetsa\gfiancgeArbeooak-aannddrrooiidd--lsidbkr-ar4i.e2s3.f0a\creebs\odokr-aawnadbrloei-dx-hsddpk-i4-.v243.c0o\mr_esf\adcreabwooakbl_ec-lhodspei.-pvng4: \com_13f2ac%e bsoiozke_ colfo ssoeur.cpen)
g: 108% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArPreocessing imaa\agend: roE:\Proid-grammliereibrn\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-hdpi-v4\com_facebook_tooltip_black_background.9.png
aries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_tooltip_black_background.9.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_portrait.png: 109% size of source)
Processing image: E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-xhdpi-v4\com_facebook_tooltip_black_background.9.png
(processed image E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res\drawable-mdpi-v4\com_facebook_profile_picture_blank_square.p`

Most helpful comment

My best guess is Android Support library is missing from the project. _Assets > Player Service Resolver > Android Resolver > Force Resolve_ may solve the problem.

Also check if "Android Support Library" installed in the Android SDK Manager.

All 6 comments

My best guess is Android Support library is missing from the project. _Assets > Player Service Resolver > Android Resolver > Force Resolve_ may solve the problem.

Also check if "Android Support Library" installed in the Android SDK Manager.

@arcv thanks ! it really worked for me.

This fix doesn't work for Unity Cloud Build. Can we get somebody looking at the problem or at least mark it as closed if it's not Facebook's bug?

This fix doesn't work for Unity Cloud Build. Can we get somebody looking at the problem or at least mark it as closed if it's not Facebook's bug?

I have the same problem, could you solve it?

My best guess is Android Support library is missing from the project. _Assets > Player Service Resolver > Android Resolver > Force Resolve_ may solve the problem.

Also check if "Android Support Library" installed in the Android SDK Manager.

lmao, days trying to fix this error about game services not working in this particluar project and this was the answer, so im glad I couldnt build and had to google this :p Thank you! <3

I had to "Update" before "Force Resolve" was an option.

I;m still not able to figure out a way to this solution. My other projects, even which r having fb SDKs are building with the same play services but not this one. Please help guys..

Was this page helpful?
0 / 5 - 0 ratings