Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio 安装android应用程序时出错_Android Studio - Fatal编程技术网

Android studio 安装android应用程序时出错

Android studio 安装android应用程序时出错,android-studio,Android Studio,我有一个应用程序,可以同时从android手机和智能手表的(加速度计和回转镜传感器)收集运动数据。我有问题,当我在手机上安装应用程序时,我遇到了这个错误 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

我有一个应用程序,可以同时从android手机和智能手表的(加速度计和回转镜传感器)收集运动数据。我有问题,当我在手机上安装应用程序时,我遇到了这个错误

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
该应用程序设计为只收集用户5分钟的运动数据,然后自动停止并将数据从手表发送到手机。最后手机将数据发送到我的电子邮件。然而,目前的问题是,应用程序并没有停止在手表上,也没有将数据发送到手机上。 能帮我什么忙吗?
恕我直言。

您需要放置由生成的配置文件

然后如第3步所述:

将刚下载的google-services.json文件复制到“应用程序”中 你的安卓系统目录


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

  <string name="google_app_id">your app id</string>
您的应用程序id

您应该根据错误声明发布gradle.build。您是否使用了快速启动示例代码?可能重复您为什么没有选择正确答案?仍然不起作用?我认为这是正确的答案,因为它对我起作用。我添加了google-services.json文件,但仍然遇到同样的问题。你可以在strings.xml中添加一行新行:
你的应用程序id
试试这个:什么是应用程序id?build.gradle上配置的应用程序id?defaultConfig{applicationId'com.ofuscated.package'…}我听不懂你说的吗?你是在问应用程序id是什么意思,还是你可以从你创建应用程序的谷歌控制台上获得谷歌应用程序id