【问题标题】:error during installation android app安装安卓应用时出错
【发布时间】:2015-12-21 01:29:23
【问题描述】:

我有一个应用程序可以同时从安卓手机和智能手表的(加速度计和陀螺仪传感器)收集运动数据)。我有问题,当我在手机上安装应用程序时出现此错误

E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services.  Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
 E/GMPM: Scheduler not set. Not logging error/warn.
 E/GMPM: Uploading is not possible. App measurement disabled

该应用程序旨在仅收集用户五分钟的运动数据,然后自动停止并将数据从手表发送到手机。最后手机将数据发送到我的电子邮件。但是,当前的问题是应用程序没有停止在手表中并且没有将数据发送到手机。 我能得到任何帮助吗? 恕我直言。

【问题讨论】:

  • 你应该根据错误声明发布 gradle.build
  • 您是否使用了快速入门示例代码?
  • 你为什么没有选择正确的答案?还是不行?

标签: android-studio


【解决方案1】:

我有同样的问题,只需将其添加到 string.xml

  <string name="google_app_id">your app id</string>

【讨论】:

  • 应用ID是什么?
  • build.gradle 上配置的 applicationId ? defaultConfig { applicationId 'com.ofuscated.package' ... }
  • 我听不懂?你是在问应用 ID 是什么意思还是什么
  • 您可以从您创建应用的谷歌控制台获取 google_app_id
【解决方案2】:

需要放置this link生成的配置文件

然后在步骤 3 中引用:

将刚刚下载的 google-services.json 文件复制到“app”中 您的 Android 目录

【讨论】:

  • 我认为这是正确的答案,因为它对我有用。
  • 我已经添加了 google-services.json 文件,但仍然遇到同样的问题。
  • 可以在strings.xml中添加新行:&lt;string name="google_app_id"&gt;your app id&lt;/string&gt;
猜你喜欢
  • 2014-08-15
  • 2015-08-09
  • 1970-01-01
  • 2018-04-08
  • 1970-01-01
  • 1970-01-01
  • 2014-12-24
  • 1970-01-01
相关资源
最近更新 更多