错误包`com.google.android.gms...` 不存在 [英] Error package `com.google.android.gms...` doesn't exist

查看:55
本文介绍了错误包`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 :

  1. 下载示例项目来自解析
  2. AnyWall-android\Anywall 文件夹从下载的项目导入到 Android Studio
  3. 重建项目
  1. download sample project from parse
  2. Import AnyWall-android\Anywall folder from downloaded project to Android Studio
  3. 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;

commonlocationmaps 突出显示为红色.问题是如何解决这些错误?

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.+'

这篇关于错误包`com.google.android.gms...` 不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆