android - Google Play Services Lib 是用我的应用程序编译的吗?

标签 android google-play-services

我对设备如何编译/使用 Google Play 服务感到有点困惑。 我了解到 Google Play 服务是通过 Play 商店在设备上更新的。 我还读到,由于 Google Play Services lib 被编译到他们的应用程序中,人们的应用程序的大小不断增加。 这两点对我来说似乎是矛盾的,所以也许我误会了什么。 所以: 1:谷歌播放服务功能是从应用程序外部运行的吗? 2:Google Play 服务是否真的编译成应用程序? 3:如果以上都成立,使用哪个版本? 4:如果我有一个使用 GPS 的 lib jar 并且主应用程序也使用 GPS,GPS 会被包含两次吗?

感谢任何可以带来更多清晰度的信息。

最佳答案

1: Is google play services functionality run externally from outside of apps?

调用源自您的应用程序并以您的应用程序的名称运行(明智的许可)。但是调用由 Google Play 服务包接收并且执行的代码也包含在 Play 中服务。

2: Is the Google Play Services actually compiled into apps?

,Google Play 服务是单独安装在您的设备上的。 不过,Play 服务接口(interface)已编译到您的应用中。

3: If both above are true which version is used?

始终使用“Google Play 服务”应用程序中的代码。并且它主要向后兼容(因此旧界面可以安全地使用更新的 Play 服务)。

4: If I have a lib jar that uses GPS and the main App also uses GPS will GPS be included twice?

如果这些 .jar 的大小不同(意味着它们是不同的版本),编译器应该警告您并中止。如果两者相同,则编译项目并且只包含一次 GPS 接口(interface)。这没关系,因为不能有多个具有相同全名的类。

关于android - Google Play Services Lib 是用我的应用程序编译的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28075637/

相关文章:

android - com.google.android.gms :play-services-measurement-base is being requested by various other libraries

android - 有条件地应用 GMS google-services 插件

android - 如何在 NativeScript 中访问 Google Play 服务

java - Android 如何连接FTP?

unity3d - 您上传的 APK 或 Android App Bundle 使用尚未生效的证书签名

android - Google Play 游戏服务包名称可能存在错误?

java - android-透明的RelativeLayout

android - ML Kit Barcode Scanner 给出空输出

安卓服务 - 错误 : service not registered

java - 如何从 Android 更新 DynamoDB 中的项目?