Android Google 地图在当前主题中找不到样式“mapViewStyle" [英] Android Google Maps Failed to find style 'mapViewStyle' in current theme

查看:35
本文介绍了Android Google 地图在当前主题中找不到样式“mapViewStyle"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

添加google地图视图时(我扩展了一个MapView,使用xml编辑器将其添加到Activity中,并手动将我的google maps api key添加到布局xml文件中)

When adding a google map view (I extended a MapView, used the xml editor to add it to the Activity, and added my google maps api key to the layout xml file manually)

我的权限允许清单文件中的互联网

My permissions allow Internet in the manifest file

我想知道的是,在 xml 编辑器中,我收到错误无法在当前主题中找到样式 'mapViewStyle'",但我似乎已正确设置了所有内容.

What i'm wondering, is in the xml editor i get the error "Failed to find style 'mapViewStyle' in current theme" but i seem to have everything set up correctly.

推荐答案

当我尝试构建一个简单的应用程序时遇到了同样的问题,遵循 Android MapView 教程.

I had the same problem when I try to build a simple app, following the Android MapView tutorial.

应用程序在 AVD 中为文件文件 main.xml 显示此异常:

The app showed this exception in AVD for the file file main.xml:

在当前主题中找不到样式mapViewStyle"

Failed to find style 'mapViewStyle' in current theme

最后发现AndroidManifest.xml文件有错误:

元素 应该是 元素的子元素,而不是直接在 中.

The element <uses-library android:name="com.google.android.maps" /> should be a child of the <application> element, not immediately within <manifest>.

希望对你有帮助.

这篇关于Android Google 地图在当前主题中找不到样式“mapViewStyle"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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