无法在任何地方找到'google-play-services_lib'

时间:2016-10-13 16:33:48

标签: unity3d google-play-services fyber

现在我正试图让Fyber在Android上的Unity游戏中工作。

并在the following step..

遇到问题

“请注意,将以上行添加到您的清单中需要您将Google Play服务lib添加到您的项目中。您可以从Android sdk路径复制google-play-services_lib项目(通常在Android / sdk / extras下) / google / google_play_services / libproject / google-play-services_lib)到Plugins \ Android下的Unity项目“

我甚至不知道我是在寻找文件还是文件夹,但我找不到任何名为的文件或文件夹 我的Android sdk或last distributed lib project from google repository中的“google-play-services_lib”如果您遇到问题,也建议下载。

当我在此刻尝试构建时,我得到了完整的错误

    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)

2 个答案:

答案 0 :(得分:0)

我找到了一个名为' google-play-services_lib'的文件夹。在google存储库的最后一个分布式lib项目中,您还建议下载并将其复制到Plugins \ Android。

但它没有解决我的问题。当我尝试构建

时,我仍然遇到同样的错误

答案 1 :(得分:0)

根据此forum,您可能有一个AndroidManifest.xml文件(可能位于此文件夹的子文件夹下的Plugins / Android或插件中),它会尝试按名称访问资源({{1但是这个值永远不会在任何地方定义。通常,此值会通过某种方法添加,例如将其添加到google_play_services_version或res / values下的AndroidManifest.xml

要解决此错误,您必须将{strong> android-sdk / extras / google / google_play_services / libproject / google-play-services_lib / res / values / 中的xml文件复制到Unity项目文件夹的资产/插件/ Android / res / values /

您还可以查看此相关主题:Android - Error building Player: CommandInvokationFailure: Failed to re-package resources,建议从Android \ sdk \ build-tools中删除24.0.0构建工具文件夹。