草庐IT

isGooglePlayServicesAvailable

全部标签

android - isGooglePlayServicesAvailable 在 Android 5 中导致 TransactionTooLargeException

我收到Fabric报告的崩溃,在检查Android5设备上的GooglePlay服务可用性时可能会发生崩溃,尤其是在OnePlus、Sony和Zuk设备中。我没有明确直接调用这段代码,似乎是由谷歌自己的代码调用的。根据其他帖子,当Parcel太大时会抛出异常,但是由于我不控制该过程,因此我自己的代码不负责创建Parcel。我已经查看了GooglePlay服务的发行说明和其他帖子,但无济于事。欢迎提出任何建议。FatalException:java.lang.RuntimeException:Packagemanagerhasdiedatandroid.app.ApplicationPa

android - GooglePlayServicesUtil.isGooglePlayServicesAvailable() 崩溃

我在2.1版移动设备上运行它。当我调试它时,我发现函数GooglePlayServicesUtil.isGooglePlayServicesAvailable()崩溃了。据说“找不到方法android.util.Base64.decode”。2.1版本太低?还是手机需要安装googleplay服务?代码如下:intstatus=GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());if(status!=ConnectionResult.SUCCESS){...}这是日志:07-2321:56:40.

java - Android 8 或更高版本 : Check for Google Play Services

此方法一直返回0。根据开发者文档,如果设备安装了最新版本的googleplay,此方法应该返回类似SUCCES的内容。有人知道如何使用它吗?@OverridepublicvoidonResume(){super.onResume();GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());System.out.println("henkie:"+GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationConte

android - GooglePlayServicesUtil 与 GoogleApiAvailability

我正在尝试在我的Android应用中使用GooglePlay服务。正如谷歌文档所说,我们需要在使用之前检查谷歌API是否可用。我已经搜索了一些方法来检查它。这是我得到的:privatebooleancheckPlayServices(){intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);if(resultCode!=ConnectionResult.SUCCESS){if(GooglePlayServicesUtil.isUserRecoverableError(resultCode)){G

android - GooglePlayServicesUtil 与 GoogleApiAvailability

我正在尝试在我的Android应用中使用GooglePlay服务。正如谷歌文档所说,我们需要在使用之前检查谷歌API是否可用。我已经搜索了一些方法来检查它。这是我得到的:privatebooleancheckPlayServices(){intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);if(resultCode!=ConnectionResult.SUCCESS){if(GooglePlayServicesUtil.isUserRecoverableError(resultCode)){G

java - 'isGooglePlayServicesAvailable'(this) 已弃用

我正在学习使用谷歌位置服务的教程。所以,我正在尝试使用GoogleAPI服务获取位置。但我得到isGooglePlayServicesAvailable(this)isdeprecated错误。任何人都可以帮忙。谢谢以下是我检查设备上是否存在Play服务的代码:privatebooleancheckPlayServices(){intresultCode=GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);if(resultCode!=ConnectionResult.SUCCESS){if(GooglePlayServ