【问题标题】:Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear连接失败=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear
【发布时间】:2016-08-03 05:27:18
【问题描述】:

我正在尝试从 Android Wear 手表(moto 360 运动)获取 GPS 坐标。作为实现它的第一步,我需要连接到 GoogleApiClient。下面是相同的代码。但是与 GoogleApiClient 的连接总是失败并显示错误消息。

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setAmbientEnabled();

        mContainerView = (BoxInsetLayout) findViewById(R.id.container);
        mTextView = (TextView) findViewById(R.id.text);
        mClockView = (TextView) findViewById(R.id.clock);

        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addApi(LocationServices.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mGoogleApiClient.connect();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mGoogleApiClient.disconnect();
    }

连接失败=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}

我看了this。接受的答案对我不起作用。我手机的google play服务版本是9.4.52(440-127739847),手表的google play服务是8.7.01(2590918-534)。我在手表上点击了这个版本。但它检查更新没有显示任何内容(我的手表需要 wifi 来检查更新并安装更新吗?)。由于接受的答案不起作用,我转到该线程的最后一个答案。所以我下载了 8.7.01 (2590918-440) (虽然最后 3 个数字不匹配)。当我试图在我的手机中安装这个 apk 时,我得到了失败 [INSTALL_FAILED_VERSION_DOWNGRADE] 因为我手机中的播放服务版本高于手表。我应该如何处理这个问题?

非常感谢您的帮助。谢谢

【问题讨论】:

    标签: android google-play-services wear-os


    【解决方案1】:

    一些 Android Wear 手表(根据民意调查,大约 10%)卡在较低的 Play Services 版本上。如果您的手表是其中之一,则无论按版本号,或其他任何操作都不会使其更新。 Google 已经意识到了这个问题(参见 herehere),并且可能很快就会找到解决方案(参见 here)。他们暂时建议不要使用 Play Service 9.x,直到问题得到解决。

    请注意,使用 9.x 的可穿戴 apk,包装在 Application-release.apk 不会部署在卡在 8.x 的手表上。它将永远等待 Play 服务更新。

    例如使用:

    compile "com.google.android.gms:play-services-location:8.4.0"
    

    而不是

    compile "com.google.android.gms:play-services-location:9.4.0"
    

    在应用程序和可穿戴设备的 build.gradle 中。

    您的手机运行更高版本并不重要。

    【讨论】:

    • 我的手机有播放服务12.5版本,而手表有9.4.52版本仍然无法连接
    • 即使是我的旧 Sony Smartwatch 3 目前也运行 12.5.29。你应该尝试更新。单击版本号会触发尝试下载最新版本。你试过了吗?
    猜你喜欢
    • 1970-01-01
    • 2016-04-25
    • 2014-03-31
    • 2014-02-12
    • 1970-01-01
    • 1970-01-01
    • 2017-01-03
    • 2017-03-19
    • 2019-08-06
    相关资源
    最近更新 更多