Reputation: 2830
Right now I'm trying to get Fyber working in my Unity game on Android.
and have run into issues at the following step..
"Keep in mind that adding the line above to your manifest will require you to add Google Play Services lib to your project. You copy the google-play-services_lib project from your android sdk path (usually under Android/sdk/extras/google/google_play_services/libproject/google-play-services_lib) to your Unity project under Plugins\Android"
I dont even know if Im looking for a file or a folder but I cant find any file or folder named "google-play-services_lib" in my Android sdk or in the last distributed lib project from google repository they also recommend downloading if your having issues.
Heres the full error I'm getting when I try to build at the moment
CommandInvokationFailure: Failed to re-package resources.
C:\Users\Blar\AppData\Local\Android\sdk\build-tools\24.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Blar/AppData/Local/Android/sdk\platforms\android-24\android.jar" -F bin/resources.ap_
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)
v14
v21
xhdpi-v4
Files:
drawable\app_banner.png
Src: (xhdpi-v4) res\drawable-xhdpi\app_banner.png
drawable\app_icon.png
Src: () res\drawable\app_icon.png
values\strings.xml
Src: () res\values\strings.xml
values\styles.xml
Src: () res\values\styles.xml
Src: (v14) res\values-v14\styles.xml
Src: (v21) res\values-v21\styles.xml
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Type drawable
drawable\app_banner.png
Src: (xhdpi-v4) res\drawable-xhdpi\app_banner.png
drawable\app_icon.png
Src: () res\drawable\app_icon.png
Type values
values\strings.xml
Src: () res\values\strings.xml
values\styles.xml
Src: () res\values\styles.xml
Src: (v14) res\values-v14\styles.xml
Src: (v21) res\values-v21\styles.xml
Including resources from package: C:\Users\Blar\AppData\Local\Android\sdk\platforms\android-24\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-xhdpi\app_banner.png
(processed image res\drawable\app_icon.png: 90% 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 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)
Upvotes: 1
Views: 653
Reputation: 1042
I was trying to install Adjust SDK to our Unity project.
'google-play-services_lib' was mentioned in Adjust SDK pdf document as "if you want to use Google Services, you need to copy google-play-services_lib under the following folder".
My colleague said it is a folder that comes up when you download some other Google SDK like Firebase SDK.
Since we did not use something like that, I have ignored this part of the tutorial.
Upvotes: 0
Reputation: 13469
Based from this forum, maybe 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.
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.
You can also check this related thread: Android - Error building Player: CommandInvokationFailure: Failed to re-package resources which suggested to delete the 24.0.0 build tools folder from Android\sdk\build-tools.
Upvotes: 0
Reputation: 2830
I found a folder called 'google-play-services_lib' in the last distributed lib project from google repository you also recommend downloading, and copied it into Plugins\Android.
But it did not fix my issue. I am still getting the same error when I try to build
Upvotes: 0