【发布时间】:2012-01-20 17:55:26
【问题描述】:
我的 Android 地图应用程序有点问题。因此,当我将 MapView 添加到我的布局 xml 文件时,它会显示“无法在当前主题中找到样式 'mapViewStyle'”错误消息。
这是我的 AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.acilSRV.client"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".AcilActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>
以及出现该错误消息的 main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<com.google.android.maps.MapView
android:id="@+id/myMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="*******"
/>
</LinearLayout>
注意:我已经检查了我的 Google Maps api key,api key 没有问题。
有什么建议吗?
【问题讨论】:
-
您是否选择了包含 GoogleApis 的构建目标?
-
是的,Google API - 10(2.3.3 版本)
-
这个问题的可能镜像:stackoverflow.com/questions/6975203/…
-
我已经尝试了所有仍然出现错误的解决方案...
-
尝试用 ant 构建以清除是否是 Eclipse 错误
标签: android google-maps