Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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.”

大佬总结

以上是大佬教程为你收集整理的android – 无法解析符号’GooglePlayServicesClient’全部内容,希望文章能够帮你解决android – 无法解析符号’GooglePlayServicesClient’所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。