问题标签 [google-play-services]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
229 浏览

android - 列表和地图标记点击

我有一个ActivityListFragment左边有一个SupportMapFragment,右边有一个。

List 和 Map 都由相同的数据支持。地图上数据的可视化表示是Markers.

我希望能够单击列表项或标记,并在其他视觉表示中获取相应的项。

框架和我的数据的限制是:

  1. Marker 类是最终的,并且 Marker 的 id 没有修饰符。这就是为什么我不能使用最简单的方法。

  2. “重要的是不要持有超出视图生命周期的对象(例如标记)。否则会导致内存泄漏,因为视图无法释放。” (参见SupportMapFragment

  3. 标记的标题可以出现多次。这就是为什么昂贵的字符串比较不是我可以采用的方法。

是否有人对此问题有有效的解决方案,或者可以提供正确方向的推动?

0 投票
3 回答
10490 浏览

android - 由于错误 2,GooglePlayServices 不可用

我正在尝试在我的 android 应用程序中使用 Google Drive。现在我只是想在谷歌驱动器上显示文件名。我使用本教程https://developers.google.com/drive/quickstart-android 在我的应用程序中设置谷歌驱动器帐户,以及此https://developers.google.com/drive/v2/reference/files/list检索文件列表。

为此,我必须创建一个异步任务:

getCloudContent 基本上是教程中的retrieveAllFiles 函数。

但是,我总是收到一些警告和错误,并且文件不会显示。

我使用 Android SDK 和最新的 Google Play 服务安装了最新的 Eclipse Juno。我使用模拟设备。google-play-services.jar 在我项目的参考库中。google drive api v2 也包括在所描述的教程中。

任何帮助表示赞赏!

0 投票
1 回答
768 浏览

android - Include Android Google Play Services failed?

I'm trying to include Google Play Services in my project to use Google Maps Android API v2, based on steps provided by Google in this link Google Play Service Setup

But unfortunately, the include process always ends with a red cross next to the included project as in the next image: enter image description here

How to solve this ?

0 投票
0 回答
322 浏览

google-maps - 将 Google Play 服务库添加到项目后资源不同步错误

我在使用 Google Maps Android API v2 的项目中遇到了一些麻烦。

我正在尝试按照 Maps API 2 官方教程调试示例项目: https ://developers.google.com/maps/documentation/android/start?hl=pt-PT

一切运行良好,但是当我将 Google Play 服务库添加到项目中时,就像遵循本教程一样: https ://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw

我收到以下错误:

> Unable to create editor ID org.eclipse.jdt.ui.PropertiesFileEditor: Resource is out of sync with the file system: '/tnc/project.properties'.

当我将库 ( .jar) 文件添加到项目时发生错误。当我删除库文件时,一切都恢复正常。

我不明白为什么添加库会使我的project.properties文件无效。我已经尝试了一切:刷新,Android 工具->修复项目属性 ,但我无法修复错误。发生错误时,项目文件夹图标中会出现一个红色感叹号。

0 投票
4 回答
79666 浏览

android - 将 Google Play 服务添加到 Eclipse 项目

我已经红色了一些帖子和文章,但它对我不起作用。我无法在我的项目中添加/使用 Google Play 服务。

我的步骤:

  1. 我开始了一个使用 Google Api 2.2 的项目
  2. 我已经使用 SDK 下载了 Google Play 服务
  3. 我将 Google Play 服务导入我的 Eclipse 工作区
  4. 在我的项目中添加 Google Play 服务作为依赖项:项目 -> 属性 -> Android -> 库,添加 -> google-play-services_lib

第 1 步到第 3 步很好,但我认为问题出在第 4 步。执行第 4 步后没有任何反应,我的项目结构没有看到任何变化:没有添加库。这些步骤也在这里描述。

我知道它不起作用的原因是因为从 Google Play 服务导入的任何内容都会出现未解决的错误。

0 投票
6 回答
28924 浏览

android - UserRecoverableAuthException:需要权限

我尝试按照教程:https ://developers.google.com/android/guides/http-auth 。

代码:

显现:

错误:

0 投票
2 回答
856 浏览

android - 无法从 Android SDK 管理器安装/下载 SDK

我正在尝试安装和使用 Google Play 服务中的库,因为我正在按照此处的步骤操作

但是,我收到这个奇怪的错误,它说找不到文件并且访问被拒绝。

在此处输入图像描述

我什至尝试过更新或下载新的 SDK,似乎我也遇到了这个问题。所以我想知道我是否遗漏了一些阻止我下载 SDK 的步骤?

0 投票
2 回答
3514 浏览

android - antcall target="release" 与 google-play-services_lib 中断

我正在尝试从命令行构建我的 android 应用程序,我有一个脚本

ant release

失败于

这对于 android google maps v2 api 是必需的

我试图将我的其他 build.xml 添加到,google-play-services_lib但后来它无法识别我的目录,尤其是变量sdk.dir

我该如何解决这个问题并将这个库添加到我的 ant 构建中?

0 投票
12 回答
237259 浏览

android - 如何在 Android 模拟器中下载 Google Play 服务?

我想在我的应用程序中使用 Google Play 服务 API,但是当我打开模拟器来测试我的应用程序时,它会向我发送一条消息,上面写着“必须下载 Google Play 服务”。我知道会发生这种情况,因为我在我MainActivity的方法中编写了这个测试onResume()
我想知道如何在我的模拟器中安装 Google Play 服务,因为很快我将需要测试我的地图。

0 投票
4 回答
487 浏览

android - 谷歌播放服务问题

我正在为外国客户开发一个 Android 应用程序,该应用程序必须为用户提供直接访问 Google play 杂志以购买杂志的权限,问题是 Google play 杂志在我的国家/地区不可用,我必须先运行测试在 Google Play 商店中发布应用程序。

所以我怎么能从我的国家访问这个杂志商店,这个访问只是为了测试而不是为了购买杂志