无法导入 com.google..... 为什么? [英] Cannot import com.google. .... why?

查看:31
本文介绍了无法导入 com.google..... 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试图编译和运行示例项目:http://developer.android.com/training/location/geofencing.html

I am simply trying to compile and run the example project from: http://developer.android.com/training/location/geofencing.html

我收到以下错误:

包 com.google.android.gms.common 不存在包 com.google.android.gms.location 不存在包 android.support.v4.app 不存在

package com.google.android.gms.common does not exist package com.google.android.gms.location does not exist package android.support.v4.app does not exist

我已经尝试了以下方法:

I have tried the following already:

我已经下载了 Google API,请查看我的 SDK 管理器窗口的屏幕截图.

I have download Google API already, see screenshot of my SDK Manager window.

我看到了不同的相关帖子,但还没有成功编译 - 甚至尝试重新启动计算机.

I saw different related posts but have not been successful in compiling this yet - even tried restarting computer.

显示已安装 Google API 的 SDK 窗口屏幕截图:http://postimg.org/image/xf64h3fu3/

Screenshot of my SDK Window showing Google API Installed: http://postimg.org/image/xf64h3fu3/

推荐答案

您需要将 Android 支持库添加到您的项目中.

You need to add the Android Support library to your project.

http://developer.android.com/tools/support-library/设置.html

为了使用支持库,您必须在开发环境中修改应用程序项目的类路径依赖项."

"In order to use a Support Library, you must modify your application's project's classpath dependencies within your development environment."

这篇关于无法导入 com.google..... 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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