MapActivity不能被解析为一个类型 [英] MapActivity cannot be resolved to a type

查看:197
本文介绍了MapActivity不能被解析为一个类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很忙,试图让包含在我的Andr​​oid项目的MapView。我下面在Android开发者网站的MapView教程,但我得到一个错误:

I'm busy trying to get the MapView included in my Android project. I'm following the MapView tutorial on the Android developer website but I'm getting an error:

'MapActivity cannot be resolved to a type'

我试过pressing按Ctrl + Shift + O来自动导入所有的类,但它没有帮助。当我尝试包括地图libary手动它给这个错误:

I tried pressing Ctrl+Shift+O to auto import all classes but it's not helping. When I try to include the Maps libary manually it gives this error:

'The import com.google.android cannot be resolved'

我已经加入以下行(见下文)的清单,我的目标是7 API(应用平台:2.1)。

I have added the following line (see below) to the Manifest and my target is API 7 (Platform: 2.1).

<uses-library android:name="com.google.android.maps" />

我是什么做错了吗?

What am I doing wrong?

谢谢!

推荐答案

谷歌API的第三方SDK。选择在包管理器的第三方。

Google API is a third party SDK. Choose third party in packages manager.

这篇关于MapActivity不能被解析为一个类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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