微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android – 无法解析符号’GooglePlayServicesClient’

我正在尝试将项目从 Eclipse迁移到 Android Studio,该项目可以在Eclipse中构建并成功导入到Android Studio中,但是,我得到无法在Android Studio中解析符号’GooglePlayServicesClient’错误.

我按照官方教程在Android Studio中导入了Google Play服务,在我的项目中使用的其他软件包“com.google.android.gms.common.ConnectionResult”没有相同的问题.只有’GooglePlayServicesClient’无法解析.

我也尝试过清理并重建我的项目,但问题仍然存在.我究竟做错了什么?

更新:

我的build.gradle

...
dependencies {
    compile project(':libraryListViewAnimations')
    compile 'com.android.support:support-v4:21.0.3'
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.google.android.gms:play-services:7.0.0'
    compile files('libs/activation.jar')
    compile files('libs/additionnal.jar')
    compile files('libs/commons-net-3.1-sources.jar')
    compile files('libs/commons-net-3.1.jar')
    compile files('libs/mail.jar')
}

解决方法

GooglePlayServicesClient已过时,不再包含在Google Play Services 7.x库中. Google建议改用 GoogleApiClient.

请参阅Android开发人员文档中的Accessing Google APIs

“注意:如果您的现有应用程序使用GooglePlayServicesClient的子类连接到Google Play服务,则应尽快迁移到Googleapiclient.”

原文地址:https://www.jb51.cc/android/310339.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐