【问题标题】:Some Google imports can not be resolved by Android StudioAndroid Studio 无法解决某些 Google 导入
【发布时间】:2016-06-15 04:40:10
【问题描述】:

Android Studio 无法解析我的 Activity 中的以下 Imports 以进行路由跟踪:

import com.google.android.gms.common.GooglePlayServicesClient;
import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener;
import com.google.android.gms.location.LocationClient;

虽然我从 Anroid SDK Manager 安装了 Google API,并在我的 build.gradle (Module:app) 中编译了以下依赖项

compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-annotations:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-base:9.0.2'

如果有任何提示或帮助,我将不胜感激。

【问题讨论】:

标签: java android import routes trace


【解决方案1】:

GooglePlayServicesClient 在新的播放服务版本中已弃用。参考:Cannot resolve symbol GooglePlayServicesClient on new Android Studio Project

LocationClient 被新的FusedLocationProviderApi 替换。参考Android play services 6.5: LocationClient is missing

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-20
    • 2013-06-07
    • 2013-06-14
    • 1970-01-01
    相关资源
    最近更新 更多