Search code examples
unity-game-enginegoogle-play-gamesbuild-error

Unity Failed to Re-package Resources Error


I am getting an error when i try to build my game for android. The error is :

CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\Users\halil.cosgun\Desktop\ADTBundle\adt_bundle\sdk\build-tools\21.1.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/halil.cosgun/Desktop/ADTBundle/adt_bundle/sdk\platforms\android-21\android.jar" -F bin/resources.ap_ --extra-packages com.fusepowered.unitytest:com.google.android.gms:com.unity3d.player:com.google.android.gms -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\FuseSDK\res" -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\google-play-services_lib\res" -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\play-services-base-6.5.87\res"

If I delete the play_game_services_libs folder (play_game_services.jar is in there), the build is successful. But, PlayGamesPlatform.Activate() code is not work. If I delete the FuseSDK, the build is successful. I know there is a conflict between this two plugins, but I didn't figure it out how I fix this problem.

Please help me.

Sincerely.

These are the screenshots my project folder :

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • Actually I didn't know how I can solve this problem at first. I tried so many ways to solve this error. First of all, I updated my JDK to latest version.(jdk1.8.0.65 - 64bit) - Then I deleted play_game_services_6.5.8.7 and AndroidSupportV4 which is in Plugins/Android/ folder. After that I added FuseSDK prefab to main scene of my project. Finally I hit Build and Run.

    Before: enter image description here After: enter image description here

    Have a nice day! :)