1
Error building Player: CommandInvokationFailure: Failed to re-package
resources. See the Console for details.
D:\Programming\IDE\adt\sdk\build-tools\21.0.0\aapt.exe package
--auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" ...

I really need some help. I am about to release the 2nd alpha version of my app to test the play services. but this error keeps on popping? do you know How can I get rid of this. tried removing androidmanifest like other said. reimporting but it is still there?

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
user3487657
  • 553
  • 2
  • 8
  • 17
  • Do you have the JDK installed? Similar error message here: http://stackoverflow.com/questions/25348615/android-error-building-player-commandinvokationfailure-failed-to-re-package – rutter Oct 21 '14 at 00:43
  • yup. but its jdk 7. should i use 8? – user3487657 Oct 21 '14 at 00:45
  • oh. nvm. a guy name Terrell Stephen got it. https://plus.google.com/115465454488748153540/posts/aBnJLvujuUq – user3487657 Oct 21 '14 at 00:52

4 Answers4

2

This is a crash in aapt on Windows: https://code.google.com/p/android/issues/detail?id=77629 FIxed in 21.0.2, please install this version of build-tools and uninstall 21.0.0 and 21.0.1.

Over17
  • 961
  • 7
  • 8
  • However, it didn't work for me since i just edited the manifest by arranging spacing only and i didn't altered any slight code. – David Dimalanta Nov 25 '14 at 07:59
  • Well, if you have something wrong with your manifest, you will be able to see the output of AAPT and understand what's wrong. With build-tools 21.0.0 and 21.0.1, AAPT just crashed leaving no output. – Over17 Nov 26 '14 at 08:25
  • My latest build tool is 23. My error is pointed at Android 4.4W since after when I installed a unity package for Google Ads for both Android and iOS. I'm focusing on Android. It worked the first time and a couple of times, maybe 3 times, on testing if the fullscreen ad mode is picking up or something. When I re-run it, I got the build failure error due to repackaging. Here's where I got the tutorials and the links to the latest Unity package from Git: https://www.youtube.com/watch?v=NR1xOMxLm04 – David Dimalanta Nov 27 '14 at 01:37
  • Whoops! Version 23 is from Android SDK Tools. My current Build Tool is 20 and I decided to delete it an install the latest one. I'll checking for errors once I've installed it. – David Dimalanta Nov 27 '14 at 01:40
  • Built-tool ver 21.1.1 is installed. I re-run it with Google Ads via Unity but nothing happened. Got build failure. (*Failed to repackage resources.*) – David Dimalanta Nov 27 '14 at 01:59
  • Checking on consoles and found missing resources at manifest: *[ AndroidManifest.xml:9: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').] stdout[Configurations: (default) Files: drawable\app_icon.png* – David Dimalanta Nov 27 '14 at 02:15
  • Solved by adding the *Google play service* folder and generate R for ID named "Integer" by importing existing code via Eclipse. (You need it though.) Calibrate target SDK. Next, I suddenly realize there is an error at *manifest* on values for *configChanges* since I broke up into several lines. I decided not to back where it is. – David Dimalanta Nov 27 '14 at 05:04
0

Version 21+ of the Android SDK Build-tools does not seem to work. Using the SDK Manager, downgrade to Version 20 and that should fix your issue.

-- Thanks to Terrell Stephen

Link

Community
  • 1
  • 1
user3487657
  • 553
  • 2
  • 8
  • 17
0

Copy google-play-services_lib folder to Plugins/Android, so you don't have to hard code Google Play Service's value. https://github.com/googleads/googleads-mobile-plugins/issues/11

budamivardi
  • 722
  • 5
  • 10
0

I also faced same issue but resolved it by moving SDK folder to C drive (I mean same installation drive (not folder) as unity). If you have space issues in your OS drive then just download new SDK from google and place it on C drive.

YakovL
  • 7,557
  • 12
  • 62
  • 102
0x52616A657368
  • 388
  • 3
  • 24