- Home /
Android - Error building Player: CommandInvokationFailure: Failed to re-package resources
Hey guys,
I am currently facing issues when trying to make an Android app for the Gear VR. I've done this plenty times before and I'm not quite sure what the problem is now. I searched around and found answers to similar questions but I cannot understand what the error message is saying for mine specifically, and if its the same for the others. Here is the error messages in the console:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\user\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/user/AppData/Local/Android/sdk\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration -S "C:\Users\user\Documents\Slender VR\Temp\StagingArea\android-libraries\ovrplugin\res"
stderr[
]
stdout[
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.Exec (System.String command, System.String args, System.String workingdir, System.String[] progress_strings, Single progress_value, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.HostView:OnGUI()
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\user\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/user/AppData/Local/Android/sdk\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration -S "C:\Users\user\Documents\Slender VR\Temp\StagingArea\android-libraries\ovrplugin\res"
stderr[
]
stdout[
]
Any help is appreciated. Many thanks.
Hi, SociopathStudios, I have the same problem, I did not find answers, here: http://answers.unity3d.com/questions/760989/failed-to-re-package-resources-2.html , have something similar, but i could not found that folder google_play_services_libprojects, in my SD$$anonymous$$ folder>>extras>>google_play_services>>
if you get solution please advise-me
Answer by rkliese · Jun 28, 2016 at 12:50 PM
I ran into the same issue. Workaround was: Open the Android SDK Manager -> SDK Tools (Tab) activate "show packages details" Open the details of "Android SDK Build Tools" Uninstall "Android SDK Build-Tools 24" Install, if not already there: "Android SDK Build-Tools 23.0.3"
That worked for me... Good luck.
Thank you so much! This solved the problem! You're a star!
@heltonspereira This is the answer.
The suggested solution should work (e.g: uninstalling Build tools 24). Please note that Unity fixed this issue, so going forward it will no longer use build tools that are in "preview" stage (like version 24 is right now).
Your answer
Follow this Question
Related Questions
I can't build a game for android 2 Answers
CommandInvokationFailure: Gradle build failed. when building app bundle 0 Answers
Gradle build faild. see... error "in unity 2020.1.4f1!!!" 0 Answers
Build error to android 3 Answers
Cannot build for Android 2 Answers