android - Google Play 服务无效

标签 android

为了给我的问题提供一些背景信息,我最近在使用 google play 服务开发的所有应用程序中遇到了错误,尽管它们以前工作过,但仍出现 classnotfound 异常。

我看到有适用于 google play 服务的更新,所以决定安装它,但现在我开发的所有应用程序都抛出“google play 服务签名无效”错误。当应用程序在我的手机上运行时,会出现一个弹出窗口,告诉我“Google Play 服务在此设备上不可用...”

在查找此错误时,我似乎找不到太多相关信息,并且对于问题的根源是什么感到非常困惑。我已尝试删除并重新导入 google-play-services 库,但这并没有帮助,我从 eclipse 控制台看到 google-play-services.apk 已成功安装在我的设备上。

我什至从 android 教程应用程序中收到此错误。

如果有人对这个问题有一点了解,我将不胜感激。

编辑:我还应该提一下,在我更新 google play 服务后,系统提示我在我的 list 中包含以下标签。

<meta-data android:name="com.google.android.gms.version"      android:value="@integer/google_play_services_version" />

我觉得这很奇怪,因为我以前从来不需要它。

Logcat 输出

11-04 17:42:36.068: I/ApplicationPackageManager(4433): cscCountry is not German : O2I
11-04 17:42:36.107: D/dalvikvm(4433): DexOpt: couldn't find field   Landroid/content/res/Configuration;.smallestScreenWidthDp
11-04 17:42:36.107: W/dalvikvm(4433): VFY: unable to resolve instance field 35
11-04 17:42:36.107: D/dalvikvm(4433): VFY: replacing opcode 0x52 at 0x0012
11-04 17:42:36.107: D/dalvikvm(4433): VFY: dead code 0x0014-0018 in  Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
11-04 17:42:36.154: W/GooglePlayServicesUtil(4433): Google Play services signature invalid.
11-04 17:42:36.154: D/result(4433): SERVICE_INVALID
11-04 17:42:36.186: I/System.out(4433): false
11-04 17:42:36.186: I/System.out(4433): false
11-04 17:42:36.186: W/GooglePlayServicesUtil(4433): Google Play services signature    invalid.
11-04 17:42:36.201: E/GooglePlayServicesUtil(4433): Google Play services is invalid. Cannot recover.

编辑 2: 我在我妈妈的手机上运行我的应用程序,它给出了一个错误,说谷歌播放服务需要在手机上更新,没有可用的新版本所以我使用了google play 服务的 froyo 版本,因为它是 rev 12。这确实有效,但我仍然完全不知道我的手机发生了什么以及为什么服务无效。

最佳答案

好吧,我似乎已经修复了,尽管它不是很漂亮,出于某种奇怪的原因,我的手机上似乎从未真正安装过 Google Play 服务,我不知道我的应用程序以前是如何工作的。我进入我的应用程序并卸载了 com.google.android.gms,然后当我的应用程序再次运行而不是告诉我不支持 Google Play 服务时,它给出了一个下载 Google Play 服务的链接,一旦我安装它似乎才能正常工作。

我应该补充一点,这都是使用 froyo 版本的 google play 服务 (rev 12)。如果我使用最新版本的 google play services (rev 13) 我被提示更新但在 google play 商店中找不到可用的更新,我认为这是因为更新还没有进入市场,因为这个版本只是3 天前发布。

关于android - Google Play 服务无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19772395/

相关文章:

android - Pandaboard GPIO banks 从内存中取消映射

Android 布局 - layout-normal vs layout

Android和使用sqlite的两点之间的距离

java - 在Java Android的一个类中使用同名方法

android - 没有在通知点击时启动应用程序? Flutter 本地通知

java - 在一类 MyGdx Game 中编写了整个游戏。我如何制作主菜单? libgdx

android - 如何将 int 数组传递到 Android OpenGl fragment 着色器

android - 使用 Firebase 和 android 处理大于 Long 的整数

android - ionic4 Android 无法添加任务 ':app:processDebugGoogleServices',因为该名称的任务已存在

android - 以编程方式创建微调器