I have no idea what I did, all I did was try to use the Ad plugin from google for my android project. After putting it in my project and trying to build I get this error.
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\Bryan\Desktop\adt-bundle-windows-x86_64-20131030\sdk\build-tools\android-4.4\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Bryan/Desktop/adt-bundle-windows-x86_64-20131030/sdk/platforms/android-19\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)
Files:
drawable\app_icon.png
Src: () res\drawable\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
Type values
values\strings.xml
Src: () res\values\strings.xml
Including resources from package: C:\Users\Bryan\Desktop\adt-bundle-windows-x86_64-20131030\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
Processing image: res\drawable\app_icon.png
(processed image res\drawable\app_icon.png: 94% size of source)
(new resource id app_icon from drawable\app_icon.png #generated)
]
You do not have to add the entire folder!
you only need to add the version.xml file to your project: (the version.xml file contains the missing Integer value that the compiler complains about)
get the version.xml file from you android-sdk path. for me, its located here:
C:\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\versions.xml
place the version.xml file in your project:
Assets\Plugins\Android\res\values\version.xml
Thanks Chip, that worked, it does give me a warning that itās obsolete now, precisely:
āOBSOLETE - Providing Android resources in Assets/Plugins/Android/res is deprecated, please move your resources to an Android Library. See āBuilding Plugins for Androidā section of the Manual.
UnityEditor.HostView:OnGUI()ā
I had the same problem and I just did the following (In unity):
āGoogle Play Games ā Setup ā Android Setupā process which solved this (by creating the setup file for the play services).
This solved the issue in my case.
I join to the problemā¦ just installed the Android SDK and I keep missing a decent documentation that explain what version I should download. I downloaded the 5.0.1 (API 21) and in the build settings I set that as minimum requirement. When I compile, Unity complains that minimum requirement is 6.0 (API 23). Why? So I installed that too, plus all the extrasā¦ a total of 48 GB!
After 12 hours of setup and failed compilations the result is:
Error: No resource found that matches the given name (at āvalueā with value ā @Integer /google_play_services_versionā
And I canāt find any version.xml file in any folder of android sdk to copy here and thereā¦
But the main question is why did I pay for android pro licence??? To have this wonderful experience?!
So now I will have probably to wait for some update that will fix this (hopefully) and introduce new bugsā¦
Very tired of thisā¦
If nothing helps (like for me), the file you need "version.xml " lies in play-services-basement-11.0.2.aar (version can be different).
All you need is to copy play-services-basement-11.0.2.aar from āANDROID_SDK/extras/google/m2repository/com/google/android/gms/play-services-basement/11.0.2/ā
(if you donāt have this folder, install Google Play Services in Android SDK manager->SDK Tools)
to Assets/Plugins/Android folder.
P.S. Now I have this problem again, because I need to build with Gradle, and nothing mentioned above works. Has anybody managed to build with Gradle project with Google play services?