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()
UPDATE: After many tries, I deleted the chartboost SDK attached to my project and it compiles fine without it. Now to discover how to compile with the sdk...
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.
Thank you very much!
Answer by Cynikal
Nov 03, 2016 at 03:13 PM
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.
Thanks for the help!
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
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.
Answers and Comments
105 People are following this question.
Cant find android SDK root folder when first trying to build for android
CommandInvokationFailure: Failed to re-package resources.
Compiler issue building to android
Is there any reaction plan for Android 6.0?
Error Building Android Player : Win32 Exception