• 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
Best Answer

Answer by Neas · Mar 28, 2014 at 08:06 PM

So I managed to solve the issue. I still have no clue what caused the problem, but error stopped showing when I moved whole project directly under "documents" folder (I usually has my projects in another folder). Hope it'll help if someone ran into this problem in future.

EDIT: if someone wants to share his opinion on why I have to use "documents" folder for storing my projects, I'd appreciative it. I'm actually really curious about what's exactly happening here.

Comment
Add comment · Show 3 · 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 ali707one · Oct 14, 2014 at 01:58 PM 0
Share

This is a issue of missing resources those are used in Android$$anonymous$$anifest file just add them will resolve this issue

avatar image Bin e croft · Dec 29, 2014 at 05:48 PM 1
Share

dude this is not working!!

avatar image akFheaven · Feb 18, 2016 at 03:11 PM 0
Share

Suffering the same problem And being mad with this shit.

avatar image
13

Answer by XiLiT · Jun 23, 2016 at 02:13 PM

I deleted the 24.0.0 build tools folder from Android\sdk\build-tools and it's working !

Comment
Add comment · Show 6 · 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 razashafique_ozitechnology · Jul 14, 2016 at 04:31 AM 0
Share

This is absolutely what fixed my problem. Thanks :)

avatar image Michael-Polla · Jul 14, 2016 at 08:51 AM 1
Share

Thanks, it worked. Note to others : you really need to delete the folder manually (using the SD$$anonymous$$ $$anonymous$$anager to delete the 24.0.0 build tools wasn't enough).

avatar image MyIsaak · Jul 15, 2016 at 08:31 PM 0
Share

Yea this worked for me too!

avatar image patrickgh3 · Jul 18, 2016 at 05:29 AM 1
Share

This worked for me too, phew! And thanks $$anonymous$$ichael-Polla for the clarification.

avatar image cuopbjen0o0 · Jul 19, 2016 at 02:40 AM 0
Share

That fixed my problem. Thanks !

Show more comments
avatar image
9

Answer by faraz · Oct 04, 2014 at 04:19 PM

Confirm check your environment path
JAVA_HOME C:\Program Files (x86)\Java\jdk1.8.0_11\bin

then

copy
zipalign.exe file from > D:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W

or where ever you have it and then Past to
D:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\tools

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

Comment
Add comment · Show 1 · 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 Wollan · Jul 04, 2016 at 02:53 PM 0
Share

$$anonymous$$oving zipalign.exe didn't work unfortunately for me but deleting Android SD$$anonymous$$ 24 folder (like suggested in stackoverflow link) did work (now using 23 again).

avatar image
2

Answer by PavanHolkar · May 13, 2016 at 03:26 PM

I think this is too late to answer this but this might help for other who is searching for answer

https://github.com/googleanalytics/google-analytics-plugin-for-unity/issues/109?_pjax=%23js-repo-pjax-container

Comment
Add comment · Show 1 · 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 levon-levonian · May 19, 2016 at 12:01 AM 0
Share

Thank you! Spot on! This is exactly what solved my issue and removed those errors. So, 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
1

Answer by PseudoDev · Mar 04, 2015 at 11:10 PM

I had this exact same error recently. After many hours of research and trying out multiple solutions from many sources on the net, I found out my solution was removing an accented letter 'e' (é) from the Unity project folder name. This was on Unity 4.6.1f1 with the Android SDK 2.1.1.1.

After applying my 'fix', I installed Unity 5 and completely reinstalled Android SDK Tools 24.1.2 and Android SDK Build Tools 21.1.2 and still have no problems building.

I don't know if this will help anyone else, but it did for me. Serves me right for using fancy French letters.

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 youbetterknowme · Apr 09, 2015 at 03:44 PM 0
Share

can you explain little bit more

avatar image PseudoDev · Apr 21, 2015 at 09:38 PM 0
Share

The project folder's name had an accented é in it. I renamed the folder and reopened it in a new installation of Unity 5 and it built normally again.

However, if I remember correctly, I was still getting the build error in Unity 5 and removing the accented letter seemed to have fixed it. I can't remember anymore as I'm no longer working on that particular project.

  • 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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

54 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

Related Questions

Android Build 0 Answers

Java error when building 1 Answer

DLL plugins unsupported for Android Application Building 0 Answers

Android build error 3 Answers

Android Build and Run Error 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges