Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
12
Question by Manco Capac · Feb 02, 2018 at 11:53 AM · androiderrorbuildapk

Failed to re-package resources.

I have been working on my game for a month. And this problem just occured. I did google this. But i cant solve it. This does not occur when i try to build an empty scene in another project, but only in my current project. I need help.

This is the error in the console. (i dont get much of it):

 Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
 C:\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/adt-bundle-windows-x86_64-20140702/sdk/platforms/android-20\android.jar" -F bin/resources.ap_
 
 stderr[
 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)
  hdpi
  ldpi
  xhdpi
  xxhdpi
 
 Files:
   drawable\app_icon.png
     Src: () res\drawable\app_icon.png
     Src: (hdpi) res\drawable-hdpi\app_icon.png
     Src: (ldpi) res\drawable-ldpi\app_icon.png
     Src: (xhdpi) res\drawable-xhdpi\app_icon.png
     Src: (xxhdpi) res\drawable-xxhdpi\app_icon.png
   values\strings.xml
     Src: () res\values\strings.xml
   AndroidManifest.xml
     Src: () AndroidManifest.xml
 
 Resource Dirs:
   Type drawable
     drawable\app_icon.png
       Src: () res\drawable\app_icon.png
       Src: (hdpi) res\drawable-hdpi\app_icon.png
       Src: (ldpi) res\drawable-ldpi\app_icon.png
       Src: (xhdpi) res\drawable-xhdpi\app_icon.png
       Src: (xxhdpi) res\drawable-xxhdpi\app_icon.png
   Type values
     values\strings.xml
       Src: () res\values\strings.xml
 Including resources from package: C:\adt-bundle-windows-x86_64-20140702\sdk\platforms\android-20\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
 Processing image: res\drawable\app_icon.png
 Processing image: res\drawable-hdpi\app_icon.png
 Processing image: res\drawable-ldpi\app_icon.png
 Processing image: res\drawable-xhdpi\app_icon.png
     (processed image res\drawable-ldpi\app_icon.png: 114% size of source)
 Processing image: res\drawable-xxhdpi\app_icon.png
     (processed image res\drawable\app_icon.png: 104% size of source)
     (processed image res\drawable-hdpi\app_icon.png: 96% size of source)
     (processed image res\drawable-xhdpi\app_icon.png: 94% size of source)
     (processed image res\drawable-xxhdpi\app_icon.png: 97% size of source)
     (new resource id app_icon from drawable\app_icon.png #generated)
     (new resource id app_icon from hdpi\drawable\app_icon.png #generated)
     (new resource id app_icon from ldpi\drawable\app_icon.png #generated)
     (new resource id app_icon from xhdpi\drawable\app_icon.png #generated)
     (new resource id app_icon from xxhdpi\drawable\app_icon.png #generated)
 ]
 
Comment
Add comment · Show 10
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 liortal · Jul 31, 2014 at 05:44 PM 1
Share

Do you have a custom Android$$anonymous$$anifest.xml in your project ?

avatar image Manco Capac · Jul 31, 2014 at 06:14 PM 0
Share

nope. nothing like that. i didnt touch anything to do with SD$$anonymous$$s.

avatar image liortal · Jul 31, 2014 at 06:36 PM 3
Share

Can you please list your Assets/Plugins/Android folder if there's anything there?

avatar image Manco Capac · Jul 31, 2014 at 07:02 PM 2
Share

there was Android$$anonymous$$anifest.xml and a unity-plugin-library.jar file. i just deleted the xml file. and it worked. i never made that idk how it got there. thanks :)

and sorry. im very new to android development

avatar image gulfam131 · Oct 13, 2014 at 03:03 PM 1
Share

Thanks a lot, it works, just by deleting . :)

Show more comments

16 Replies

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

Answer by liortal · Oct 20, 2014 at 01:17 PM

The issue is that you have an AndroidManifest.xml file (Probably under Plugins/Android or a plugin in a subfolder of this folder) that tries to access a resource by name (google_play_services_version), but this value is never defined anywhere.

Usually, this value is added via some method such as adding it to the AndroidManifest.xml or to an xml under res/values.

For example, see the documentation here (under Add the Google Play services version to your app's manifest).

NOTE: Sometimes, it can get a bit tricky to find out why the build fails. If all else fails, i recommend you to check out this link - it is a professional service to help fix Android related build issues (due to manifest merging, conflicting plugins, etc). Check it out if you're unable to resolve your issues !

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 Manco Capac · Oct 20, 2014 at 02:27 PM 0
Share

sorry that i hadn't said that liortal's answer was correct. And your's is too. Thanks to both of you

avatar image JonnyHilly · Dec 16, 2014 at 09:02 PM 0
Share

I implemented the fix posted by liortal... it sounds good but... I now get this error.. (from the fix code) Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). What does this mean ? Can unity not find google play services libraries or something ?

avatar image
22

Answer by khayamgondal · Apr 07, 2015 at 04:28 AM

To fix this error, you have to copy the version.xml file from

android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/

into Assets/Plugins/Android/res/values/ of your Unity project's folder.

Comment
Add comment · Show 9 · 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 siyecao · Feb 12, 2016 at 06:05 AM 0
Share

there isnt a google folder in my sdk.sxtras, only a android folder, sorry for my bad english, i am Chinese, so, what happened?

avatar image Adam-Halley-Prinable · Feb 21, 2016 at 12:08 PM 0
Share

I didn't have a res folder in google-play-services_lib, but there were some res folders inside OTHER Folders inside google-play-services_lib. I pasted that versson.xml file into each of them and it solved the problem :D

avatar image mehdi14 Adam-Halley-Prinable · Mar 22, 2016 at 11:40 PM 0
Share

you made it ( create folder named "values" inside the values create folder named "res")

avatar image rooh452 · Apr 15, 2016 at 02:08 PM 0
Share

didn't worked...

avatar image Zamaroht · Jun 13, 2016 at 08:07 PM 0
Share

wow, this magically worked, thank you

avatar image Bata1999 · Jun 19, 2016 at 05:04 AM 1
Share

I have the same problem as you all have. But I tried all the options possible and I can't Build and Run the app. I can't find the version.xml file, I've deleted the Android$$anonymous$$anifest.xml. If there is something I could do and you know how, it would be of great help.

CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\Users\Bautista\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -$$anonymous$$ Android$$anonymous$$anifest.xml -S "res" -I "C:/Users/Bautista/AppData/Local/Android/sdk\platforms\android-24\android.jar" -F bin/resources.ap_

stderr[

] stdout[

] UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.Android.PostProcessAndroidPlayer.Exec (System.String command, System.String args, System.String workingdir, System.String[] progress_strings, Single progress_value, System.String error$$anonymous$$sg) 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()

avatar image Vesa Bata1999 · Jun 22, 2016 at 09:39 AM 3
Share

This issue seems to be related to build-tools version. I had the same issue today after Android Studio upgraded build-tools to 24.0.0. Downgraded back to 23.0.2 and then it worked again.

avatar image dneuhaus10 Vesa · Jul 10, 2016 at 01:39 AM 0
Share

I had the exact same issue and Downgrading back to 23.0.2 worked for me. Thank you!

Show more comments
avatar image
17

Answer by pophead2 · Jun 22, 2016 at 08:36 PM

Moro! I had this issue when I was trying to push my project to Android. Here is the Fix(Founded in reddit) that worked for me.

1) Find and open your SDK Manager.exe at android-sdk folder.

2) under tool, have Android SDK tools 25.1.7 and Android SDK Platfomr-tools 24 installed.

3) uninstall Android SDK Build-tools 24 and install 23.0.1 instead.

Done.

Comment
Add comment · Show 9 · 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 Eric-Lu · Jun 27, 2016 at 05:06 AM 0
Share

Thanks a lot! This indeedly works! and by the way: if someone encountered the "URL NOT Found" issue in SD$$anonymous$$ manager while installing 23.0.1 on Win10, you can try run the "SD$$anonymous$$ $$anonymous$$anager.exe" as ad$$anonymous$$istrator. If this doesnt work, can still try run "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" as ad$$anonymous$$istrator on Win 10 and this worked for me.

avatar image robby702 · Jul 14, 2016 at 09:51 AM 0
Share

I logged in just to upvote this and thank you. I have been going through every possible solution for hours now and this finally worked. Thanks a bunch!

avatar image yusufguvenmobile · Jul 15, 2016 at 12:30 AM 0
Share

i did it but i have same error with 23.0.1 Please help me!

CommandInvokationFailure: Failed to re-package resources. See the Console for details. /Users/yusufguven/Documents/Android/sdk/build-tools/23.0.1/aapt package --auto-add-overlay

avatar image liortal yusufguvenmobile · Jul 15, 2016 at 09:05 AM 0
Share

Hard to tell since this is not the full log. I can assist with fixing Android related issues, see here: https://www.fiverr.com/lysergide/fix-android-build-issues-in-your-unity3d-project

avatar image yusufguvenmobile liortal · Jul 15, 2016 at 12:05 PM 0
Share

i did please help.

avatar image Nokola · Jul 18, 2016 at 04:26 PM 0
Share

Awesome! Worked for me too!

avatar image iamkhova · Jul 24, 2016 at 04:34 PM 0
Share

This also solved the problem I was having,

Show more comments
avatar image
9

Answer by chaurasiyapawan · Oct 18, 2014 at 05:08 AM

I found a better solution: 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

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 MFen · Sep 12, 2015 at 02:20 PM 0
Share

This worked great, just want to underline that it HAS to go in the plugins/android folder (got me once hah).

avatar image Elvizcocho · Feb 17, 2018 at 02:26 PM 0
Share

i dont have the google-play-services-lib folder and i cant find where is the Plugins/Android! help me on what steps should i take to fix the error!

avatar image
4

Answer by mubasherikram · Mar 31, 2015 at 03:08 PM

RESOLVED !!! I was facing this issue while integrating AdMob and ChartBoost via Prime[31]. his issue was resolved by following steps.

  1. Delete all plugin Directories.

  2. Import first plugin

  3. import second plugin but remember to uncheck google-game-palay services_lib folder

its done

Comment
Add comment · Show 5 · 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 TarunL · Jul 31, 2015 at 02:55 PM 0
Share

Thanks a ton mubasherikram(how to pronounce :p)

this help me a lot

avatar image ethqnit · Oct 12, 2015 at 06:29 AM 0
Share

Same here if you do it right it works...THAN$$anonymous$$S!!!

avatar image DemonIg15 · Jun 07, 2016 at 09:13 AM 0
Share

Thanks a lot! Otherwise, my steps was - close In app purchase services, remove Plugins folder, install admob package, install chartboost package, enable in app purchase service.

avatar image julianqwerty · Jun 26, 2016 at 09:02 PM 0
Share

what kinda plugins? i dont have anything. i am SO confused!

avatar image pophead2 julianqwerty · Jun 27, 2016 at 03:09 PM 0
Share

Julian, things might have changed since this thread started. I also didn't find those folders. Thing is, with new android SD$$anonymous$$, things might be done in different way. check newer post for different solutions.

  • 1
  • 2
  • 3
  • 4
  • ›

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.

Follow this Question

Answers Answers and Comments

73 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

Related Questions

Android SDK does not include error 1 Answer

Having issue building apk 1 Answer

APK is installed but does not show the application and does not open either. 1 Answer

Error build android app 1 Answer

Failed to re-package resources using everyplay plugin and google play plugin for leaderboard 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