gpt4 book ai didi

android - 找不到 google-play-services_lib

转载 作者:行者123 更新时间:2023-12-03 15:57:28 25 4
gpt4 key购买 nike

我正在尝试将 Google Analytics(分析)集成到我的 Unity 游戏中。我已经下载并安装了 latest unitypackage .

在 Unity 中单击 Google Analytics > Setup > Install google-play-services_lib 后我收到此错误:

enter image description here

我已经在 Android SDK 管理器中安装了 Google Play 服务,但它没有安装库。甚至包的描述也说它只安装 JavaDoc 和示例代码,没有库:

GooglePlayServices installation screenshot

所以问题是在 /extras/google/google_play_services/ 文件夹中根本没有 libproject 子文件夹。只有 JavaDoc 和 Samples 文件夹。

我读过 the documentation (选择 OTHER,因为我既没有使用 Android Studio 也没有使用 Eclipse),按照说明一步一步操作,但它不起作用。我的谷歌搜索是徒劳的。如何安装 google play 服务库?

最佳答案

您是否尝试过检查设置 Google Play Services谷歌文档?

对于安卓工作室:

  1. Open the build.gradle file inside your application module directory.
  2. Add a new build rule under dependencies for the latest version of play-services. For example:

应用插件:'com.android.application'...

依赖关系{编译 'com.google.android.gms:play-services:fp9.0.0'

  1. Save the changes and click Sync Project with Gradle Files in the toolbar.

Note: If the number of method references in your app exceeds the 65K limit, your app may fail to compile. You may be able to mitigate this problem when compiling your app by specifying only the specific Google Play services APIs your app uses, instead of all of them. For information on how to do this, see Selectively compiling APIs into your executable.

对于带有 ADT 的 Eclipse:

  1. Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects.
  2. Import the library project into your Eclipse workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
  3. In your app project, reference Google Play services library project. See Referencing a Library Project for Eclipse for more information on how to do this.
  4. After you've added the Google Play services library as a dependency for your app project, open your app's manifest file and add the following tag as a child of the <application> element:

关于android - 找不到 google-play-services_lib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37344706/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com