3

我无法让我的 Android Wear 应用程序运行。每次尝试在手机上打开某些东西时,我都会在 logcat 中不断收到此错误:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9256000 but found 8701534

我的应用程序应该没有什么问题,因为它以前工作过。当我对我的 LG G Watch 进行出厂重置时,它停止工作。
我用一个应用程序检查了手表上的 Google Play 版本代码,它是(正如 logcat 所说)8701534。(为什么不更新?)我的手机有版本号9256448。以下是一些截图:

华为 Nexus 6P 垂钓者LG G 手表 LGW100

(点击查看大图)。



这是手表的(缩短的)build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.my.packagename"
        minSdkVersion 21
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.support:wearable:1.3.0'
    compile 'com.google.android.gms:play-services-wearable:9.2.0'
}

这是手机的(缩短的)build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.my.packagename"
        minSdkVersion 11
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    wearApp project(':wear')
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.google.android.gms:play-services-wearable:9.2.0'

    ...
}

我已经尝试过通常的方法,例如:

  • 手表恢复出厂设置(大约 5 次)
  • 清除手机上 Google Play 服务的缓存/数据
  • 在手机上重新安装了 Google Play 服务。
  • 将手表连接到 3 个不同的设备。请参阅下面的设备名称。
  • 让手表保持连接状态约 12 小时。(手机和手表都已连接并在充电器上)。没有改变。
  • 改为compile 'com.google.android.gms:play-services-wearable:9.2.0'_compile 'com.google.android.gms:play-services-wearable:+'

以下是我尝试过的手机型号,包括手表:

  • LG G 手表 LGW100(Android 6.0.1、Android Wear 1.5)
  • 华为 Nexus 6P (Android Nougat Preview 4)
  • 三星 Galaxy S5 (Android 6.0.1)
  • 三星盖乐世 S6 (Android 6.0.1)

我确定这不是电话,因为我将手表连接在三个不同的设备上。

你有什么建议吗?

4

4 回答 4

1

我今天遇到了同样的问题,不知何故我设法克服了它。我做的事情:

  • 在手机上重新安装了 Android Wear(由于这个
  • 从 Android Wear 应用程序中取消配对手表,然后修复它
  • 从 Android Wear 应用重新同步应用几次
  • 在手表上,在设置/关于/版本中,我点击了 GMS 版本几次。它应该说“检查更新”。起初在此操作中 logcat 出现错误,然后(重新安装等后)这些错误消失了。
  • 开始地图和健身(希望他们以某种方式触发更新)
于 2016-07-04T19:25:13.190 回答
1

它终于更新了。它花了几天时间来更新 Google Play 服务。现在它有版本9.2.56。我想手表更新 Google Play 服务只需要一些时间。

于 2016-07-05T10:28:48.367 回答
0

另一种选择是通过 odb 手动升级 Google Play 服务:

  • 下载最新的 Google Play 服务 apk(从这里
  • 通过安装它adb install -r com.google.android.gms*

我的手表(Samsung Gear S with Wear 1.5)在出厂重置后(与您的相同:8.7.01 - 534)具有极旧版本的 Google Play 服务,并且在配对后没有安装任何应用程序。手动更新播放服务解决了这个问题。

于 2020-06-26T08:38:31.133 回答
0

您可以编辑依赖版本:

compile 'com.google.android.gms:play-services-wearable:8.7.0'

注意8.7而不是9.2。另请注意,这不是修复程序,而是一种解决方法。

编辑:在一个完美的世界里,所有手表都会立即更新到最新的播放服务,但似乎还不是这样。这也是我将其声明为解决方法而不是修复的原因。

于 2016-07-03T13:04:33.057 回答