为了给我的问题提供一些背景信息,我最近在所有使用 google play 服务的开发应用程序中都遇到了错误,尽管它们以前工作过,但仍给出了 classnotfound 异常。
我看到有一个可用于 google play 服务的更新,所以决定安装它,但现在我所有开发的应用程序都抛出“google play 服务签名无效”错误。当应用程序在我的手机上运行时,会出现一个弹出窗口,告诉我“Google Play 服务在此设备上不可用......”
查找此错误时,我似乎找不到太多关于此错误的信息,并且对问题的根源感到非常困惑。我尝试删除并重新导入 google-play-services 库,但这并没有帮助,我从 Eclipse 控制台看到 google-play-services.apk 已成功安装在我的设备上。
即使从 android 教程应用程序中,我也会收到此错误。
如果有人对这个问题有一点了解,我将不胜感激。
编辑:我还应该提到,在我更新谷歌播放服务后,我被提示在我的清单中包含以下标签。
<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:我在妈妈的手机上运行我的应用程序,它给出了一个错误,说需要在手机上更新谷歌播放服务,没有可用的新版本,所以我使用了谷歌播放服务的froyo版本,因为它是rev 12.这确实有效,但我仍然完全不知道我的手机发生了什么以及为什么服务无效。