• 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 /
avatar image
4
Question by Neas · Mar 27, 2014 at 08:45 PM · androidbuild-error

Android - Error building Player: CommandInvokationFailure: Failed to re-package resources

Hi,

so I have been trying to build simple game on android and during build I've got error message below. Googling it didn't help.

I'm using lastest versions of Unity, Android SDK (everything from SDK Manager under Extras, Tools, Android 4.4.3 and Android 2.3.3) and Java SDK. My OS is Windows 8.1. Everything works fine when using Unity Remote. Any ideas what should I do? :(

 Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
 C:\Program Files\Android SDK\adt-bundle-windows-x86_64-20140321\sdk\build-tools\android-4.4.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Program Files/Android SDK/adt-bundle-windows-x86_64-20140321/sdk/platforms/android-19\android.jar" -F bin/resources.ap_
 
 stderr[
 AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/app_icon').
 AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
 AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
 ]
 stdout[
 Configurations:
  (default)
 
 Files:
   AndroidManifest.xml
     Src: () AndroidManifest.xml
 
 Resource Dirs:
 Including resources from package: C:\Program Files\Android SDK\adt-bundle-windows-x86_64-20140321\sdk\platforms\android-19\android.jar
 applyFileOverlay for drawable
 applyFileOverlay for layout
 applyFileOverlay for anim
 applyFileOverlay for animator
 applyFileOverlay for interpolator
 applyFileOverlay for transition
 applyFileOverlay for xml
 applyFileOverlay for raw
 applyFileOverlay for color
 applyFileOverlay for menu
 applyFileOverlay for mipmap
 ]
Comment
Add comment · Show 1
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 maria-dev · Sep 28, 2014 at 08:42 PM 2
Share

It helped me. http://stackoverflow.com/questions/25348615/android-error-building-player-commandinvokationfailure-failed-to-re-package

23 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ritesh_khokhani · Dec 15, 2015 at 05:01 AM

Hey,

It's because you are not installed latest android API version on your PC or MAC,

If you are using any third party API/plugins or Google API in your project which is developed for lasted android API then this would try to find package files while building, and if it is not able to find the same then this would results in CommandInvokationFailure..

Hope this would help!

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 slake_it · Jan 19, 2016 at 01:43 PM

deleting plugins / android / google-play-services_lib / res / values / common_attrs removed this error..

source: http://forum.unity3d.com/threads/failed-to-re-package-resources-help.345837/

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 lrpsantiago · Jan 28, 2016 at 10:32 AM

I had a similar problem, my solution was:


  1. Delete the folder: Assets\Plugins\Android\google-play-services_lib

  2. Copy the original "google-play-services_lib" folder, from the Android SDK directory: SDK\extras\google\google_play_services\libproject\google-play-services_lib.

  3. Paste the folder inside: Assets\Plugins\Android


That's it, build your APK and everything should be ok. I hope it could help.


P.S.: Be careful to not modify the original "google-play-services_lib" folder, from the Android SDK directory. Don't cut the folder, just copy and paste in your project, then you are free to do any modifications on your copy.

Comment
Add comment · Show 2 · 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 jarduz · Mar 29, 2016 at 01:32 PM 0
Share

does not work

avatar image levon-levonian · May 18, 2016 at 11:59 PM 0
Share

That does not work. Eventually the solution was to add: svcSupport.DependOn("com.google.android.gms", "play-services-analytics", "LATEST"); into Ad$$anonymous$$obDependencies.cs (I was trying to integrate mobile ads), but it could be another *Dependencies.cs script if you are integrating something else, like Google Play Game Services, etc.

avatar image
0

Answer by jarduz · Mar 29, 2016 at 03:19 PM

 CommandInvokationFailure: Failed to re-package resources. See the Console for details.
 R:\Android\sdk\sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "R:/Android/sdk/sdk\platforms\android-23\android.jar" -F bin/resources.ap_
 
 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()
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
-1

Answer by agiza2009 · Apr 08, 2016 at 10:29 PM

I have shown this problem I want a solution

CommandInvokationFailure: Failed to re-package resources. See the Console for details.

C:\Program Files (x86)\adt-bundle-windows-x86_64-20140702\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:/Program Files (x86)/adt-bundle-windows-x86_64-20140702/sdk\platforms\android-23\android.jar" -F bin/resources.ap_

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()

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
  • 3
  • 4
  • 5
  • ›

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

53 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

Related Questions

Failed to find Build Tools revision 29.0.0 - Android Builds 4 Answers

Android Build Error More than one file was found with OS independent path 'play-services-basement.properties' After adding Admob 0 Answers

Error when building peogram onto Android device 0 Answers

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

Socket error in Android Build 1 Answer


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