2016-05-15 96 views
0

我尝试了其他答案中给出的所有内容,但仍无法导入gms。不像其他答案,在导入gms的子类时出错,我在gms本身遇到问题。无法解析符号'gms'。无法导入Google Play服务

这是我得到 Error

编辑的错误:即使这样写的 enter image description here

新增compile 'com.google.android.gms:play-services:8.4.0' Gradle

这是我已经安装在SDK SDK SDK External

这是项目结构 enter image description here

我在做什么错在这里?

+0

你可能并不需要所有的播放服务,因此建议有选择地挑选你真的需要,以减少你的应用程序的大小的。 https://developers.google.com/android/guides/setup#split –

+1

而且我不确定你在哪里找到的是要导入的包,但是第一次搜索“android gms location”会带来这个https:// developers.google.com/android/reference/com/google/android/gms/location/package-summary –

回答

2

尝试这样

import com.google.android.gms.location.*;