Connection Failed => ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null,message = null} Android Wear [英] Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} Android Wear

查看:173
本文介绍了Connection Failed => ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null,message = null} Android Wear的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从Android佩戴手表(moto 360 sport)获取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}



我看了这个。接受的答案不适合我。我的手机的谷歌播放服务版本是9.4.52(440-127739847),我的手表中的谷歌播放服务是8.7.01(2590918-534)。我在我的手表上点击了这个版本。但它检查更新没有显示任何东西(我需要无线网络在我的手表来检查更新和安装更新?)。由于接受的答案不起作用,我转到该主题的最后一个答案。所以我下载了8.7.01(2590918-440)(尽管最后3个数字不匹配)。当我尝试在我的手机上安装此apk时,由于我的手机中的播放服务版本高于手表版本,因此我得到了失败[INSTALL_FAILED_VERSION_DOWNGRADE]
。我应该如何处理这个问题?



非常感谢您的帮助。谢谢

解决方案

一些Android Wear手表(约占民意调查的10%)在较低的Play服务版本中停滞不前。如果您的手表是其中之一,则无论按下版本号,还是其他任何都不会使其更新。 Google知道此问题(请参阅此处这里),并很快找到解决方案(请参阅 here )。暂时他们建议不要使用Play Sevices 9.x,直到问题得到解决。



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



例如,使用:

  compilecom.google.android.gms:play-services-location:8.4.0

而不是

  compilecom.google.android.gms:play-services-location:9.4.0

在应用程序和可穿戴方面的build.gradle中。



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

I am trying to get GPS coordinates from Android wear watch (moto 360 sport). As a first step towards it, I need to connect to GoogleApiClient. Below is the code for the same. But the connection to GoogleApiClient is always failing with the error message.

@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();
    }

Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}

I looked at this. The accepted answer did not work for me. The google play services version of my mobile phone is 9.4.52(440-127739847) and the google play services in my watch is 8.7.01(2590918-534). I tapped on this version in my watch. But it checked for updates did not show up anything (Do I need wifi in my watch to check for updates and install the updates?). Since the accepted answer did not work, I moved on to the last answer of that thread. So I downloaded 8.7.01 (2590918-440) (though the last 3 numbers doesn't match). when I tried to install this apk in my mobile, I got Failure [INSTALL_FAILED_VERSION_DOWNGRADE] as my version of play services in my mobile is higher than that of watch. How should I proceed with this issue?

Your help is much appreciated. Thanks

解决方案

Some Android Wear watches (about 10%, according to polls) got stuck at lower Play Services versions. If your watch is one of them, neither pressing the version number, nor anything else will make it update. Google are aware of the issue (see here and here), and likely to find a solution soon (see here). Temporarily they advise not to use Play Sevices 9.x, until the problem is resolved.

Pay attention to the fact, that the wearable apk using 9.x, wrapped into the Application-release.apk will not be deployed on watches stuck at 8.x. It'll be waiting forever for the Play Services to update.

E.g. use:

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

instead of

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

in your build.gradle on both Application and Wearable sides.

It doesn't matter that your phone runs a higher version.

这篇关于Connection Failed => ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null,message = null} Android Wear的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆