• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
4
Question by NeoToriyama · Mar 17, 2016 at 08:38 AM · unity 5value

CommandInvokationFailure: Failed to re-package resources

I've just recently began development for the Gear VR on Unity 5, and after creating my scene, which is just a basic room with the cameras, I get the error "Failed to re-package resources". I tried some of the methods listed in other threads here, but to no avail. Any help would be appreciated. Here's the error codes:

 CommandInvokationFailure: Failed to re-package resources. See the Console for details.
 C:\Users\XXX\AppData\Local\Android\sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/XXX/AppData/Local/Android/sdk\platforms\android-21\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration -S "C:\Users\Public\Documents\Unity Projects\New Unity Project\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\XXX\AppData\Local\Android\sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/XXX/AppData/Local/Android/sdk\platforms\android-21\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration -S "C:\Users\Public\Documents\Unity Projects\New Unity Project\Temp\StagingArea\android-libraries\ovrplugin\res"
 
 stderr[
 
 ]
 stdout[
 
 ]

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ali-hatem · Mar 17, 2016 at 09:05 AM 0
Share

same problem click here

avatar image jk34594345 Ali-hatem · Mar 17, 2016 at 04:24 PM 0
Share

No, that doesn't seem to be the same problem.... See the same problem below :-)

7 Replies

· Add your reply
  • Sort: 
avatar image
16
Best Answer

Answer by jk34594345 · Mar 17, 2016 at 04:22 PM

I got the same error. What it looks like is that Unity does not work well with the version "24.0.0-preview" of the Android SDK build tools.

Solution: 1.) Quit unity 2.) Make sure you have e.g. the version "23.0.0" of the Android build tools installed. 3.) Find the folder called "24.0.0-preview" in your android SDK and delete it. ( Or move it somewhere else to copy it back again once you're "done" with your unity dev'ing and maybe want to use the latest Android SDK for other stuff. 4.) Restart unity, exporting.

This worked for me. It's not a great solution, because you basically can't use the latest Android SDK version...

I tried to find a place "in unity" where one could configure which SDK version to use, but couldn't find that.

I haven't filed a bug report yet, but maybe that'd be a good idea...

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MiguelMizzi94 · Apr 22, 2016 at 12:20 PM 0
Share

This worked ! Thanks

avatar image designbydalo · Apr 29, 2016 at 10:37 AM 0
Share

Thanks a lot ! You saved me hours of searching !!

avatar image zakirshikhli · May 23, 2016 at 07:49 AM 0
Share

Thank You very much

avatar image wando0717 · Jun 24, 2016 at 06:46 AM 0
Share

Thank You!! It is a good solution.

avatar image OperationT · Jul 10, 2016 at 08:34 PM 0
Share

I was having the same problem with 24.0.0, but not 24.0.0-preview. Nevertheless, this solution solved the issue for me by reverting to 23.0.3.

Show more comments
avatar image
0

Answer by NeoToriyama · Mar 17, 2016 at 07:56 PM

Thank you! It actually worked! Now. I can build my apks out, I really appreciate this, gonna get me on the way to developing my own apps! Thanks again!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by pixity71 · Jun 16, 2016 at 07:39 PM

Worked for me!! Unity 5.3.5 and deleted at this location C:\Users[user]\AppData\Local\Android\sdk\build-tools

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by zakirshikhli · Jun 17, 2016 at 05:24 PM

After updating Unity to 5.3.5 I installed back all SDK versions till API 24 and 23 preview, NO ERRORS. Thanks to Unity team for useful update.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by parjanyaroy · Jul 09, 2016 at 06:56 AM

Worked like a charm !! :D ... And I was stuck with updating sdk , creating version.xml , replacing aapt.exe for the last week . wish I had found this thread sooner . Thnx ..

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

87 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How Can I Reset Values?(Unity3D) 0 Answers

iron sight using inverse kinematic 0 Answers

SteamVR Interaction - Bug 0 Answers

Unity 5 C# InputField NullReferenceException 1 Answer

VR on Android crashes when i add a character model 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges