Search Unity

Help! Can't build project after trying to use Google Play Services!

Discussion in 'Editor & General Support' started by TheCowMan, Apr 29, 2014.

  1. TheCowMan

    TheCowMan

    Joined:
    Aug 24, 2010
    Posts:
    387
    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.
    Code (csharp):
    1. Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    2. 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_
    3.  
    4. stderr[
    5. AndroidManifest.xml:9: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
    6. ]
    7. stdout[
    8. Configurations:
    9.  (default)
    10.  
    11. Files:
    12.   drawable\app_icon.png
    13.     Src: () res\drawable\app_icon.png
    14.   values\strings.xml
    15.     Src: () res\values\strings.xml
    16.   AndroidManifest.xml
    17.     Src: () AndroidManifest.xml
    18.  
    19. Resource Dirs:
    20.   Type drawable
    21.     drawable\app_icon.png
    22.       Src: () res\drawable\app_icon.png
    23.   Type values
    24.     values\strings.xml
    25.       Src: () res\values\strings.xml
    26. Including resources from package: C:\Users\Bryan\Desktop\adt-bundle-windows-x86_64-20131030\sdk\platforms\android-19\android.jar
    27. applyFileOverlay for drawable
    28. applyFileOverlay for layout
    29. applyFileOverlay for anim
    30. applyFileOverlay for animator
    31. applyFileOverlay for interpolator
    32. applyFileOverlay for transition
    33. applyFileOverlay for xml
    34. applyFileOverlay for raw
    35. applyFileOverlay for color
    36. applyFileOverlay for menu
    37. applyFileOverlay for mipmap
    38. Processing image: res\drawable\app_icon.png
    39.     (processed image res\drawable\app_icon.png: 94% size of source)
    40.     (new resource id app_icon from drawable\app_icon.png #generated)
    41. ]
    42.  
    I really need help guys! Thanks!
     
  2. Caio_Lib

    Caio_Lib

    Joined:
    Mar 4, 2014
    Posts:
    83
  3. Caio_Lib

    Caio_Lib

    Joined:
    Mar 4, 2014
    Posts:
    83
    taxvi and BlackPanda like this.
  4. BlackPanda

    BlackPanda

    Joined:
    Jan 24, 2014
    Posts:
    78
    Thanks, that helped. I accidentally imported the root folder of google-play-services_lib into the project. Now the error is gone.
     
  5. chipopox

    chipopox

    Joined:
    Aug 21, 2015
    Posts:
    2
    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)
    1. 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

    2. place the version.xml file in your project:
    Assets\Plugins\Android\res\values\version.xml
     
  6. rakeshmalik91

    rakeshmalik91

    Joined:
    Aug 16, 2014
    Posts:
    9
    Thanks that helped
     
  7. ThePersister

    ThePersister

    Joined:
    Jul 23, 2014
    Posts:
    1
    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()"

    But at least it can build for now :)
     
    mindevs likes this.
  8. ntnt2014

    ntnt2014

    Joined:
    Jul 9, 2014
    Posts:
    1

    Thank you
    you are right ^_^
     
  9. guywald

    guywald

    Joined:
    Aug 22, 2013
    Posts:
    13
    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.
     
    GiannyDevs likes this.
  10. hshogs

    hshogs

    Joined:
    Apr 9, 2015
    Posts:
    3
    Thanks so much! Have been pulling my hair out trying to solve a string of strange build issues, this was the last piece of the puzzle.
     
  11. KnightsHouseGames

    KnightsHouseGames

    Joined:
    Jun 25, 2015
    Posts:
    850
    So I'm trying to follow through this, and in our Google Play Games folder, there is no Setup folder

    Also, we are lacking libproject

    Every tutorial we have found requires us to have this, and we can't run our project now
     
  12. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    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...
     
  13. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Last edited: Jun 2, 2016
  14. googlerOTS

    googlerOTS

    Joined:
    May 10, 2017
    Posts:
    5
    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?
     
    Last edited: Jul 31, 2017
    DRIVER1ksa likes this.
  15. Dirly

    Dirly

    Joined:
    Mar 24, 2013
    Posts:
    19
    Were you able to fix this? I'm now having this same damn issue:

     
    Last edited: Aug 9, 2017
  16. googlerOTS

    googlerOTS

    Joined:
    May 10, 2017
    Posts:
    5
    Actually, I just deleted string
    Code (JavaScript):
    1. <meta-data android:name="com.google.android.gms.version"
    2.                    android:value="@integer/google_play_services_version"/>
    from manifest
     
    Royy212, FanCorp and EvRayder like this.
  17. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    104
    But after deleting this line, I can't log in with google play services.
     
    chtnpnchlp likes this.
  18. victorhugolafuente

    victorhugolafuente

    Joined:
    Dec 22, 2017
    Posts:
    6