Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by upariver · Nov 03, 2016 at 03:07 PM · androidandroid buildandroid sdk

Failed to re-repackage resources

I tried to install the 23.0.3 but its not working. Could anyone point me where I'm doing things wrong please?

CommandInvokationFailure: Failed to re-package resources. C:\NVPACK\android-sdk-windows\build-tools\23.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/NVPACK/android-sdk-windows\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages com.chartboost.sdk.unity:com.oculus.Integration -S "H:\MightySalmonStudios\Projects\Unity\Chisel\Chisel\Temp\StagingArea\android-libraries\OVRPlugin\res"

stderr[ AndroidManifest.xml:17: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

] stdout[ Configurations: (default)

Files: values\values.xml Src: () H:\MightySalmonStudios\Projects\Unity\Chisel\Chisel\Temp\StagingArea\android-libraries\OVRPlugin\res\values\values.xml AndroidManifest.xml Src: () AndroidManifest.xml

Resource Dirs: Type values values\values.xml Src: () H:\MightySalmonStudios\Projects\Unity\Chisel\Chisel\Temp\StagingArea\android-libraries\OVRPlugin\res\values\values.xml Including resources from package: C:\NVPACK\android-sdk-windows\platforms\android-25\android.jar applyFileOverlay for drawable trying overlaySet Key=app_banner.png trying overlaySet Key=app_icon.png 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-xhdpi\app_banner.png Processing image: res\drawable-mdpi\app_icon.png (processed image res\drawable-mdpi\app_icon.png: 94% size of source) (processed image res\drawable-xhdpi\app_banner.png: 93% size of source) (new resource id app_banner from xhdpi-v4\drawable\app_banner.png #generated) (new resource id app_icon from mdpi-v4\drawable\app_icon.png #generated) ] UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retiresOnFailure) UnityEditor.HostView:OnGUI()

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 upariver · Nov 03, 2016 at 09:02 PM 0
Share

UPDATE: After many tries, I deleted the chartboost SD$$anonymous$$ attached to my project and it compiles fine without it. Now to discover how to compile with the sdk...

2 Replies

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

Answer by liortal · Nov 10, 2016 at 07:46 AM

You are referencing a resource in your AndroidManifest (@integer/google_play_services_version) but this resource is not defined anywhere.

Previously (i think up to around a year ago), the Google play services library was distributed as a single .jar file, or could be downloaded from the Android SDK manager as an Android library project (e.g: a folder with a particular structure, including libs/ folder with the compiled .jar, a manifest, resources, etc).

Some developers used to include Google play services by merely copying the .jar file into the Unity project. This only included the client code for accessing Google play services, but did not include any resources (a resource can be an image, an integer, etc. In this particular case - it's an integer - a version number).

So, in your case - you have probably included the older form of google play services, added an entry to the manifest that references this resource - @integer/google_play_services_version, but did not include the res/ folder with those definitions.

The problem is, Google stopped distributing google play services in that form. Instead, they have segregated (split) the single .jar file into many smaller .aar files. This allows you finer granularity in choosing which exact client code you want to include, instead of including 1 huge .jar file.

To resolve your problem, you have 2 choices:

  • Include the Google play services android library project (the older one). You can search the web for it (here is an example that may work: https://github.com/MobileChromeApps/google-play-services/tree/master/libs/google-play-services_lib). Place this entire folder under Assets/Plugins/Android (make sure to remove the existing google play services .jar file).

  • Switch to the newer form of including Google play services - remove the existing .jar file and include Google play .aar libraries.

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 upariver · Nov 10, 2016 at 10:05 AM 0
Share

Thank you very much!

avatar image NopkarCraft · Jul 18, 2019 at 01:48 PM 0
Share

THAN$$anonymous$$ YOU SOOOO $$anonymous$$UCH -

avatar image
1

Answer by Cynikal · Nov 03, 2016 at 03:13 PM

https://forum.unity3d.com/threads/help-cant-build-project-after-trying-to-use-google-play-services.243284/

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 upariver · Nov 03, 2016 at 06:47 PM 0
Share

Thank you for answering. I have been trying several answers from this, but none are working so far. I cannot find the C:\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\versions.xml.

avatar image upariver · Nov 10, 2016 at 10:05 AM 0
Share

Thanks for the help!

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

101 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 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

Unity cannot find compatible Android device? 1 Answer

How to get Android 10 (API Level 29) 1 Answer

I am having trouble building the project for android (i can't build) 0 Answers

Android apk build can install but won't start. 2 Answers

How come when I generate a signed APK it produces out a JKS file? 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