【问题标题】:Add Google Play Service into eclipse workspace Android将 Google Play 服务添加到 Eclipse 工作区 Android
【发布时间】:2014-03-22 07:00:34
【问题描述】:

我正在尝试在我的 Android 应用程序中实现 Admob。我找到了从 sdk>extras>google_play_services 添加 google play 服务的方法。我已经导入到我的工作区,但我无法将它添加到我的项目中。项目的选择未突出显示。

谁能帮帮我?

【问题讨论】:

标签: android eclipse google-play-services android-library


【解决方案1】:

在您的项目中导入 Google_play_services_lib 后,您必须启用“复制到工作区”复选框。因此,您可以在 Eclipse 中找到该库项目。之后你必须去

右键单击项目->转到属性->从左侧栏中单击Android->添加库->单击那里您将找到google_play_service_lib->单击应用并确定。

因此它将作为库项目添加到您的项目中。

第二种选择是您可以将 GoogleAdMobAdsSdk-6.4.1.jar jar 文件导入到您的 libs 文件夹中。

【讨论】:

  • 我仍然无法添加它。我从工作区中删除了 google-play-service-lib 并尝试了。
  • 你尝试添加jar文件了吗?
  • 不,我没有 jar 文件。我没有 admob 帐户,所以无法下载 jar 文件
  • 它是免费的。你可以从网上下载。
  • 如果你不介意你能把链接发到哪里我可以得到 jar 文件,还有一件事我可以使用其他移动广告网络,如 revmob,其中的leadbolt
【解决方案2】:

按照以下步骤操作:

-> 右键单击​​项目 -> 转到属性 -> 从左侧栏中单击 Android -> 向下滚动,您将在那里看到添加库选项 -> 点击那里你会发现 google_play_service_lib -> 点击应用并确定。

【讨论】:

  • 我在项目选择窗口中找不到 google_play_service_lib
  • 首先您必须将 google_play_services_lib 导入到您的项目所在的同一工作区中。
  • 是的,我已将其导入我的项目工作区。但我无法添加它
  • 只写点击 google_play_services_lib 并转到 android 选项卡,检查是否选中了“isLibrary”复选框?
  • 我可以将其他项目添加到我的应用中。但无法添加 google-play-service-lib
【解决方案3】:

在这里回答:

Import project with no .project file

只需使用现有源文件创建一个新项目,然后选择您从 Android SDK 文件夹复制到工作区的 google-play-services-lib 文件,如下所述:

https://developer.android.com/google/play-services/setup.html

【讨论】:

    【解决方案4】:

    我刚刚找到了解决方案。这对我有用。

    将 google-play-services_lib 导入工作区后,进入该项目并查找 project.properties

    最后这一行: android.library=true

    例如:

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must be checked in Version Control Systems.
    #
    # To customize properties used by the Ant build system edit
    # "ant.properties", and override values to adapt the script to your
    # project structure.
    #
    # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
    #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
    
    # Project target.
    target=android-20
    android.library=true
    

    【讨论】:

      猜你喜欢
      • 2019-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-12
      • 1970-01-01
      • 2016-02-01
      • 1970-01-01
      相关资源
      最近更新 更多