0
我目前正在使用Gcm向Android設備發送通知。 我從SDK管理器中安裝了谷歌播放服務Rev.15 - > extras,並導入並引用了我的android應用中的那些。
我的Android項目API級別爲17 在manifest文件中,我有更新Google Play服務。除非您更新Google Play服務,否則此應用無法運行
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
這是谷歌,播放services_lib的清單
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="4242030"
android:versionName="4.2.42 (1018832-030)" >
<uses-sdk android:minSdkVersion="9"/>
</manifest>
我用AVD_for_Nexus_One_by_Google 4.2.2阿比LEVEL- 17以Google API爲目標(Google Inc.)
這是我的android應用程序中用於檢查播放服務的代碼
private boolean checkPlayServices() {
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (resultCode != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
GooglePlayServicesUtil.getErrorDialog(resultCode, this,
PLAY_SERVICES_RESOLUTION_REQUEST).show();
} else {
Log.i(TAG, "This device is not supported.");
finish();
}
return false;
}
return true;
}
我收到以下錯誤消息。
更新Google Play服務。除非您更新Google Play服務,否則此應用無法運行。
而在日誌中我發現,谷歌播放服務已過時。需要4242000,但找到3136130.
請幫我這個。謝謝!
謝謝。我用真實的設備嘗試過,它的工作正常。但我想得到這與模擬器的工作,因爲我沒有自己的Android設備。 – Reva
你可能會找到一種方法將它切入模擬器。但我不相信StackOverflow是你會找到它的地方。更有可能是XDA開發人員等開發人員論壇。 – Budius
如果我在這裏得到肯定的答覆,那對我會有很大的幫助。因爲我花了整整一天的時間。我在做什麼錯了。我怎麼能克服呢? – Reva