【发布时间】:2014-07-02 08:48:06
【问题描述】:
我开发了一个使用 GoogleMap 的应用。我刚刚在 Eclipse 中更新了 Android 插件(带有 Android L 库),并重新导入了 GooglePlayService 库等。
所以,我重新编译,它在我的手机(4.4.2 中的 Sony Xperia Z)、GenyMotion Emulator (4.4.2)、Nexus 7 (4.4.2) 上运行良好。但它不适用于两台三星 Galaxy S4 (4.4.2) 和另一台 4.4.2 中的三星平板电脑。其实我是这样查看GooglePlay Service的版本的:
resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this.getActivity());
// resultCode = ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED;
if (resultCode != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
GooglePlayServicesUtil.getErrorDialog(resultCode, this.getActivity(), 1).show();
rootView = inflater.inflate(R.layout.fragment_googleplayerror, container, false);
return rootView;
} else {
Log.i(Tag, "This device is not supported.");
getActivity().finish();
}
}
else {
rootView = inflater.inflate(R.layout.activity_tracking, container, false);
}
因此,在应用无法运行的设备中,Android 检测到 GPS (GooglePlayService) 不是最新的,并重定向到 GooglePlayStore,但在 Play 商店中只有两个按钮:卸载和打开。我还读到 import GooglePlayServiceForFroyo 可以解决 pb。但是,为什么它在某些设备上运行,而在其他设备上运行,即使它们在相同的 Android 版本上?
【问题讨论】:
-
您可以在您的应用程序外部更新 GPS 吗? (即直接访问 Play 商店而不启动您的代码)。
-
尝试在手机中启用 Gps 服务...
-
我无法从 PlayStore 更新 GPS:只有两个按钮:“打开”或“卸载”
-
它也适用于 Nexus 4
标签: java android google-maps google-play-services