[英]Android Wear Error ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null}
[英]Android Wear Emulator show Error SERVICE_VERSION_UPDATE_REQUIRED for Google Play services
我正在Wear Emulator上測試android wear應用,並使用eclipse開發。
在Wear應用中,onCreate中包含以下代碼:
mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener()
{
@Override
public void onConnectionFailed(ConnectionResult result)
{
Log.d(TAG, "onConnectionFailed: " + result);
}
}).addApi(Wearable.API).build();
mGoogleApiClient.connect();
在Wear模擬器上運行此命令時,出現以下錯誤:
W/GooglePlayServicesUtil(1809): Google Play services out of date. Requires 5089000 but found 5077534
D/WearApp(1809): onConnectionFailed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null}
如果有任何解決方案或提示,請告訴我。
謝謝!
我相信我也有同樣的錯誤。
如果您的build.gradle是:
compile 'com.google.android.gms:play-services:+'
更改為:
compile 'com.google.android.gms:play-services:5.0.89'
這是因為Google並未完全向設備推出最新的播放服務,但開發人員已經可以使用它。 作為替代解決方案,您可以檢查SDK Manager上的WearEmulator是否有更新。
如果您查看build.gradle文件,則可能正在使用播放服務。 您需要改用具有正確版本的play-services-wearable。
compile 'com.google.android.gms:play-services-wearable:+'
如果使用的是Eclipse,則需要確保解壓縮可穿戴播放服務的AAR文件,而不是標准的移動播放服務AAR文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.