android - Google Play 服务示例 : "connectionResult cannot be resolved"

标签 android google-play-services

当我尝试按照有关如何检查是否安装了 Google Play 服务的示例进行操作时,我收到以下错误:servicesConnected 方法内的行中出现“connectionResult cannot be resolved”

int errorCode = connectionResult.getErrorCode();

可以缺少什么?我正在复制并粘贴它。 我正在按照示例 here

谢谢!

最佳答案

这是示例中的错误。改用这个:

        } else {
        // Get the error code
        // Get the error dialog from Google Play services
        Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
                resultCode,
                this,
                CONNECTION_FAILURE_RESOLUTION_REQUEST);

关于android - Google Play 服务示例 : "connectionResult cannot be resolved",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17303941/

相关文章:

android实时多人游戏-在游戏开始前在玩家之间共享数据

android - 该代码不断告诉我我需要更新Google Play服务。我该如何解决?

android - 在 android 中单击 gmail 通知时,在 Intent 选择器对话框中隐藏我的应用程序

android - android gradle 插件升级后单元测试期间无法加载自定义字体

java - 从数组中删除数字

android - eclipse打开gcm-demo-client时GCM Registrar无法解析

android - 为 map R.java 文件错误引用 google play 服务

AndroidManifest 合并错误 : Error: uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library

Android java.lang.IllegalStateException : Couldn't init cursor window

android - 为什么第一次播放媒体时会触发 MediaPlayer OnCompletion?