Android Studio 无法解析我的 Activity 中的以下导入以进行路由跟踪:
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'
如果有任何提示或帮助,我将不胜感激。
最佳答案
GooglePlayServicesClient
在新的播放服务版本中已弃用。引用:Cannot resolve symbol GooglePlayServicesClient on new Android Studio Project
LocationClient
已替换为新的 FusedLocationProviderApi
。引用Android play services 6.5: LocationClient is missing
关于java - Android Studio 无法解析某些 Google 导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37826287/