gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:23:08 29 4
gpt4 key购买 nike

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

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

手持设备上的播放服务是最新的

我已经添加了

compile 'com.google.android.gms:play-services:7.3.0'

对于两者,手持设备,作为 wear build.gradle。

可穿戴 Activity :

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

我进行了研究,但找不到任何可行的解决方案。

最佳答案

我在 ASUS ZenWatch 上使用 Google Play 服务时遇到了类似的问题,

在可穿戴设备中总是抛出错误:

ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null

Google Play services out of date. Requires 7327000 but found 6774534

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

enter image description here

所以,检查可穿戴 Google Play 服务版本

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

并重新同步应用

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

等待 3-5 分钟,检查可穿戴设备 Google Play 服务版本。

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

希望你能理解我蹩脚的英语。

关于Android Wear 错误 ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null},我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30171361/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com