【发布时间】: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