不能解析符号谷歌API客户端Android Studio中 [英] Cannot Resolve Symbol Google API Client in Android Studio
本文介绍了不能解析符号谷歌API客户端Android Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到一个错误Android Studio中的以下内容:
I'm getting an error in Android Studio for the following:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API).build();
我已经把这个在我的表现,<元数据机器人:名字=com.google.android.gms.version
机器人:值=@整数/ GOOGLE_PLAY_SERVICES_VERSION/>
和编译com.google.android.gms:发挥服务:87年5月6日。
在我依赖的gradle
and compile 'com.google.android.gms:play-services:6.5.87'
in my gradle dependencies.
我已经下载所需的SDK的文件。
I've downloaded the required sdk files as well.
为什么我仍然得到这个错误?
Why do I still get this error?
推荐答案
尽管在本教程中没有正式上市,您必须使用以下导入:
Even though not officially listed in the tutorial, you must use the following imports:
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
这篇关于不能解析符号谷歌API客户端Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文