playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 962 forks source link

play-games-plugin-for-unity and facebook unity sdk build error{ Build Failure: Failed to re-package resources. See the console for details.} #2532

Open Sibz23 opened 5 years ago

Sibz23 commented 5 years ago

Hi. I am using Unity 2017.4.23f1. In my project, I have successfully integrated the play games plugin. But when I import the facebook SDK and build after going through the due process. It gives Build Error that says:

Build Failure: Failed to re-package resources. See the console for details.

And this is the error log:

CommandInvokationFailure: Failed to re-package resources. C:\sdk\build-tools\28.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/sdk\platforms\android-27\android.jar" -F bin/resources.ap_ --extra-packages com.facebook.android:com.facebook.applinks:com.facebook.common:com.facebook.core:com.facebook.login:com.facebook.messenger:com.facebook.places:com.facebook.share:com.google.example.games.mainlibproj -S "E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.12.1\res" -S "E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res" -S "E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-login\res" -S "E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-messenger\res" -S "E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res"

stderr[ E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\values\values.xml:72: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar'.

E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\values\values.xml:77: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Dialog'.

] stdout[ Configurations: (default) mdpi-v4 hdpi-v4 xhdpi-v4 xxhdpi-v4

Files: color\com_facebook_send_button_text_color.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\color\com_facebook_send_button_text_color.xml drawable\com_facebook_button_send_background.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable\com_facebook_button_send_background.xml drawable\com_facebook_button_send_icon_blue.png Src: (mdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png Src: (hdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png Src: (xhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png drawable\com_facebook_button_send_icon_white.png Src: (mdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png Src: (hdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png Src: (xhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png Src: (xxhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png drawable\com_facebook_send_button_icon.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable\com_facebook_send_button_icon.xml values\values.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\values\values.xml AndroidManifest.xml Src: () AndroidManifest.xml

Resource Dirs: Type color color\com_facebook_send_button_text_color.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\color\com_facebook_send_button_text_color.xml Type drawable drawable\com_facebook_button_send_background.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable\com_facebook_button_send_background.xml drawable\com_facebook_button_send_icon_blue.png Src: (mdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png Src: (hdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png Src: (xhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png drawable\com_facebook_button_send_icon_white.png Src: (mdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png Src: (hdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png Src: (xhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png Src: (xxhdpi-v4) E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png drawable\com_facebook_send_button_icon.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable\com_facebook_send_button_icon.xml Type values values\values.xml Src: () E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\values\values.xml Including resources from package: C:\sdk\platforms\android-27\android.jar applyFileOverlay for drawable 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=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_profile_picture_blank_portrait.png trying overlaySet Key=com_facebook_profile_picture_blank_square.png 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=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_close.png trying overlaySet Key=com_facebook_favicon_blue.xml trying overlaySet Key=app_banner.png trying overlaySet Key=app_icon.png applyFileOverlay for layout 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 trying overlaySet Key=com_facebook_tooltip_bubble.xml 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 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 applyFileOverlay for menu applyFileOverlay for font applyFileOverlay for mipmap Processing image: res\drawable-xhdpi\app_banner.png Processing image: res\drawable-mdpi\app_icon.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_icon_blue.png: 113% size of source) (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_icon_blue.png: 105% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_icon_blue.png: 106% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_icon_white.png: 161% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_icon_blue.png: 103% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_icon_white.png: 157% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_icon_white.png: 162% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_icon_white.png: 157% size of source) (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_button_like_icon_selected.png: 147% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-hdpi-v4\com_facebook_button_like_icon_selected.png: 138% size of source) (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xhdpi-v4\com_facebook_button_like_icon_selected.png: 130% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-xxhdpi-v4\com_facebook_button_like_icon_selected.png: 125% size of source) (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_blue.png: 143% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_blue.png: 136% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_blue.png: 179% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-mdpi-v4\com_facebook_button_send_icon_white.png: 103% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-hdpi-v4\com_facebook_button_send_icon_white.png: 187% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xxhdpi-v4\com_facebook_button_send_icon_white.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-share\res\drawable-xhdpi-v4\com_facebook_button_send_icon_white.png: 185% size of source) Processing image: E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\android-libraries\facebook-common\res\drawable-mdpi-v4\com_facebook_close.png (processed image E:\Unity Projects 2017\GPGSandPUN\GPGSandPUN\Temp\StagingArea\an

Can someone please give me a solution to this problem. Thanks

Teddymac22 commented 5 years ago

I don't know what the problem is, but I had this same issue using Unity 2018,3,8f1. I fixed it using GooglePlayServices 0.9.60 and Facebook SDK 7.15.1 by checking Gradle build in the Unity Build setup.

I've had errors when attempting to build with Gradle in times past, but this time it worked thankfully.

Sibz23 commented 5 years ago

But I am not using the Gradle build. I am using the Internal build system.

Teddymac22 commented 5 years ago

But I am not using the Gradle build. I am using the Internal build system.

You could try to switch to a Gradle build? Open the Build Settings then where it says Build System click to open the drop down and select Gradle. It will change the setup for you and the PlayServicesResolver will do it's work if you have it set to auto resolve, if not you would need to manually resolve.

I just selected Gradle as the build system then Unity set it up and I was then able to complete an Android build. The Internal build says it's depricated in Unity 2018.3.8.f1, so you'll probably need to start using Gradle at some point.

Sibz23 commented 5 years ago

So after building successfully the Gradle build gives you an apk?

Teddymac22 commented 5 years ago

Yes, it's just a different way to build the apk. As I said though, I had issues getting Gradle builds to work using older versions of Unity, so if it fails you may need to upgrade your Unity.

Sibz23 commented 5 years ago

Yes, it's just a different way to build the apk. As I said though, I had issues getting Gradle builds to work using older versions of Unity, so if it fails you may need to upgrade your Unity.

Yeah exactly. Upon creating a new project and switching it to the Android platform, Unity by default selects the Gradle which it didn't use to in previous versions, so even if I am not using any of these plugins and I build using Gradle it gives me errors. So I then change the Build to Internal and it builds the apk.

I will try your way and then come back with the results. I hope it works.