【发布时间】:2012-03-01 16:25:08
【问题描述】:
开始开发使用 Maps API 的 Android 应用程序时,我不知道我必须为应用程序“Google APIs”设置特殊的 TARGET。现在,我发现添加了新的基于地图的功能,即导入
import com.google.android.maps.MapActivity;
导致
无法解析导入的 com.google
好的,我得到了地图布局
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:clickable="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="my_api_key"
/>
并添加了
<uses-library android:name="com.google.android.maps" />
到清单文件。
所以,如果这个错误与我在创建项目开始时设置的错误目标有关,我可以修复它 - 现在在几乎准备好的应用程序中更改目标吗?还是这个错误是由其他原因引起的?
【问题讨论】: