Android Wear错误ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null}

Jul*_*ius 7 android data-layer google-play-services moto-360 wear-os

我想制作一个简单的可穿戴应用程序并通过数据层连接.手持模块(使用:S5)一切正常,但可穿戴设备(使用:Moto 360)总是抛出错误:

onConnectionFailed:ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null}

掌上电脑的播放服务是最新的

我已经添加

compile 'com.google.android.gms:play-services:7.3.0'
Run Code Online (Sandbox Code Playgroud)

对于两者,手持设备,作为磨损build.gradle.

可穿戴活动:

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
        stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
            @Override
            public void onLayoutInflated(WatchViewStub stub) {
                mTextView = (TextView) stub.findViewById(R.id.text);
            }
        });
        int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
        Log.i(TAG,"Services available: "+ result);
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {
                    @Override
                    public void onConnected(Bundle connectionHint) {
                        Log.d(TAG, "onConnected: " + connectionHint);
                        // Now you can use the Data Layer API
                    }
                    @Override
                    public void onConnectionSuspended(int cause) {
                        Log.d(TAG, "onConnectionSuspended: " + cause);
                    }
                })
                .addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {
                    @Override
                    public void onConnectionFailed(ConnectionResult result) {
                        Log.d(TAG, "onConnectionFailed: " + result);
                    }
                })
                        // Request access only to the Wearable API
                .addApi(Wearable.API)
                .build();

    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.i(TAG, "==OnStart===");
        mGoogleApiClient.connect();
    }
Run Code Online (Sandbox Code Playgroud)

我做过研究,但找不到任何有效的解决方案.

aiu*_*iur 6

当我在华硕ZenWatch上使用Google Play服务时遇到类似的问题,

在wearable中总是抛出错误:

ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null

Google Play服务已过期.需要7327000但找到6774534

我发现可穿戴和手持式Google Play服务可能无法同步,我不知道为什么.

在此输入图像描述

因此,请检查可穿戴的Google Play服务版本

设置 - >关于 - >软件版本

并重新同步应用程序

启动Android Wear应用程序 - >单击齿轮图标 - >选择您的设备 - >重新同步应用程序

等待3-5分钟,检查可穿戴的Google Play服务版本.

同步完成后,也许您可​​以使用它.

希望你能理解我破碎的英语.

  • 嗯谷歌播放服务不同步我.在我的手机上它是8.1.15版本,在磨损模拟器上它是7.3.27. (2认同)