如何决定使用哪个版本的Google Play服务? [英] How to decide which version of Google Play services to use?

查看:1746
本文介绍了如何决定使用哪个版本的Google Play服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究支持Android版本14及更高版本的Android应用程序。我已经将我的应用程序编译为Android版本21.
我已经使用Google Play Services 7.0.0。该应用程序在Android 21上运行良好。但是,当我在Android版本19上运行该应用程序时,它会抛出以下异常:Google Play服务过期。需要7095000,但找到了6183036



因此,我想知道Google Play的版本应该包含在我的应用程序中,以便它可以正常工作在Android 14及以上版本中。

解决方案

我想你正试图用错误的方法找到你的问题的答案。 p>

您要包含的Google Play服务版本取决于您的应用程序实现的API。根据您要支持的设备选择版本会以不利的方式影响您的应用程序性能。



附近的连接A​​PI Places API 已添加到 Google Play服务7.0 中。如果您的应用程序正在使用此版本Play服务中添加的任何这些或其他API,那么,如果您在Gradle文件中指定较小的版本,则这些功能可能无法正常工作。



同样, Mobile Vision API 附近消息已在Google Play服务版本7.8中引入。即使您想要支持Android 2.3设备,您也无法通过包含早期版本的Play服务来实现它们。



地图和基于位置的服务服务已在许多Play服务版本中更新。每次更新都增加了一项小功能,并提高了整体电池效率和响应能力。您正在使用的版本号会影响电池使用时间...



在Google Play服务现有版本的每次更新中,都会发布新的API,并改进旧版API。考虑您的应用程序正在实施的API,然后决定您希望用户更新哪些Play服务版本,以便他们可以顺利使用您的应用程序。许多Android用户定期更新他们的Google Play服务。即使用户使用了KitKat设备或冰淇淋三明治,他们也可以将他们的Google Play服务更新到最新的7.8版本或中间版本。


I am working on an Android application which supports Android version 14 and above. I have compiled my application against Android version 21. I have used Google Play Services 7.0.0. The application works fine on Android 21. But when I run the application on Android version 19, it throws the following exception

Google Play services out of date. Requires 7095000 but found 6183036

So, I want to know what should be the version of Google Play that I should include in my application so that it works fine on Android 14 and above.

解决方案

I think you are trying to find an answer to your question using a wrong approach.

The version of the Google Play Services that you want to include depends on the APIs your application implements. Picking a version based on the device you want to support will affect your application performance in a negative way.

Nearby Connections API, Places API are added in the Google Play services 7.0. If your application is using any of those or other APIs added in this version of Play Services then, these features may not work if you specify a lesser version in the Gradle files.

Similarly, Mobile Vision API, Nearby Messages were introduced in the Google Play Services version 7.8. There is no way you can implement them by including an earlier version of Play Services even if you want to support Android 2.3 devices.

Maps and Location Based Services services had been updated in many Play Services versions. Each update has added a small feature to it and improved overall battery efficiency, responsiveness. The version number you are using will affect the battery life ...

In every update to the Google Play Services existing versions, new APIs are released and old ones are improved. Consider the APIs your application is implementing then decide which version of the Play Services you want your users to update so that they can use your application smoothly.

Many Android users regularly update their Google Play Services. Even if the user has a KitKat device or Ice Cream Sandwich they could have updated their Google Play Services to the latest 7.8 version or to an intermediate version.

这篇关于如何决定使用哪个版本的Google Play服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆