错误包`com.google.android.gms...` 不存在
我是 Android 开发的新手.我正在学习使用 Parse.com 后端服务并很早就陷入困境.
I am new to Android development. I am learning to use Parse.com backend service and get stuck early on.
我正在按照 教程 创建使用 Google Maps Android API v2
的应用程序.我做了什么:
I am following tutorial to create application that uses Google Maps Android API v2
. What I've done :
- 下载示例项目来自解析
- 将
AnyWall-android\Anywall
文件夹从下载的项目导入到 Android Studio - 重建项目
- download sample project from parse
- Import
AnyWall-android\Anywall
folder from downloaded project to Android Studio - Rebuild project
然后我在这里收到一堆错误:
Then I get a bunch of errors here :
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.location.LocationClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap.CancelableCallback;
import com.google.android.gms.maps.GoogleMap.OnCameraChangeListener;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.Circle;
import com.google.android.gms.maps.model.CircleOptions;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
common
、location
和 maps
突出显示为红色.问题是如何解决这些错误?
common
, location
, and maps
highlighted red. The question is how to resolve these errors?
我感谢任何形式的帮助或指导(我应该检查什么?是否与缺少库有关?如果是,我应该添加什么库以及从哪里获取它?)
I appreciate any kind of help or direction (What should I check? Is it about missing library? If it is, what library should I add and where to get it?)
找不到类 com.google.android.gms.location.LocationClient (android)
最后一个 GPS 库有问题.您必须使用比最新版本(6.+)更旧的版本.尝试使用旧版本.我在文档中没有看到有关 LocationClient.class 的任何内容已弃用或丢失...
There is some problem with the last GPS lib. You have to use an older version than the latest(6.+). Try with an older version. I didn't see anything inside the doc deprecated or missing about the LocationClient.class...
编译'com.google.android.gms:play-services:5.+'
compile 'com.google.android.gms:play-services:5.+'