无法找到风格'mapViewStyle“在当前主题 [英] Failed to find style 'mapViewStyle' in current theme

查看:111
本文介绍了无法找到风格'mapViewStyle“在当前主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个应用程序,它使用谷歌地图。但是,在我的XML,我得到个错误无法找到风格'mapViewStyle在当前主题。相反,我已经给onternet权限和所使用的谷歌地图图书馆中的应用标签内。

任何人可以帮助我在此。

多谢

下面是我的xml文件...

 < XML版本=1.0编码=UTF-8&GT?;
    < RelativeLayout的的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
        机器人:方向=垂直
        机器人:layout_width =FILL_PARENT
        机器人:layout_height =FILL_PARENT
        >
    <的TextView
        机器人:layout_width =FILL_PARENT
        机器人:layout_height =WRAP_CONTENT
        机器人:文本=@字符串/你好
        />
  < com.google.android.maps.MapView
    机器人:ID =@ + ID / mapview1
    机器人:layout_width =FILL_PARENT
    机器人:layout_height =FILL_PARENT
    机器人:启用=真
    机器人:可点击=真
    机器人:apiKey =0ACHOtlugQlOP_-siR3LLyIBjv1SwpKWimIY8jw/>
< / RelativeLayout的>
 

解决方案

我的回答可能是晚了,但我希望它会与实际的原因,并确保交易可能是为那些谁是要寻找有帮助关于未来的同样的问题。

这类型的错误,

  1。 Android的谷歌地图无法找到在当前的主题风格'mapViewStyle
2.找到在当前的主题风格imageButtonStyle'失败
3.找到在当前的主题风格editTextStyle'失败
4.找到当前的主题风格textViewStyle'失败
 

任何东西,从上述列表中它可以是

的根本原因是,

我们选择了不可用主题布局

这可能会导致因为,

  1. 选中主题不是的themes.xml 文件。
  2. 可用
  3. 选中主题是属于更高版本 SDK ,但我们目前的目标 SDK 是较低的。

这个问题大多发生,

  1. 当你复制整个布局文件,并尝试在你的实施IT项目。 一个。您五月忘了复制的themes.xml 文件 湾您可能有更低的目标SDK ,原布局较高目标SDK创建

对于这个问题的解决方案是,

打开图形布局视图<和查看布局文件/ code>,并期待在右上角。 有你的主题布局已选定。)

  1. 那么单击下拉列表主题选项,并选择可用的主题根据项目主题目标SDK主题。                        (OR)
  2. 如果在主题自定义一,如果你需要它,然后复制的themes.xml 文件,从您复制布局XML 文件的源项目。                        (OR)
  3. 如果在主题 SDK 主题,如果你需要的话,那么根据您选择的主题
  4. 更改目标

希望,这可能是别人有帮助的。

I am making an app which uses google maps. But in my xml I get th error "Failed to find style 'mapViewStyle' in current theme." Instead I have given onternet permission and used the google maps library inside the application tag.

Can anybody help me over this.

Thanks a lot

following is my xml file...

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout 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/mapview1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:enabled="true"
    android:clickable="true"
    android:apiKey="0ACHOtlugQlOP_-siR3LLyIBjv1SwpKWimIY8jw" />
</Relativelayout>

解决方案

My answer may be a late one, but i hope that it'll deals with the actual reason and sure it could be helpful for those who are going to search about the same problem in future.

This type of errors,

1. Android Google Maps Failed to find style 'mapViewStyle' in current theme
2. Failed to find style 'imageButtonStyle' in current theme 
3. Failed to find style 'editTextStyle' in current theme 
4. Failed to find style 'textViewStyle' in current theme 

Anything from the above list it may be,

The ultimate reason is ,

We have selected the unavailable Theme for the layout.

This may cause because of,

  1. The selected theme is not available in themes.xml file.
  2. The selected theme is belongs to higher version sdk, but our current target sdk is lower one.

This problem mostly happens,

  1. when you copy the whole layout file and try to implement it in your project. a. Your may forgot to copy themes.xml file b. You may have lower target sdk, the original layout created with higher target sdk.

The Solutions for this problem are,

(Open and View the layout file in the Graphical Layout View, and look at the top Right corner. There your themes for the layout have been selected.)

  1. So click the dropdown list for theme selection and choose the available themes according to your project themes and targeted sdk themes. (OR)
  2. If the theme is a custom one , if you are required it , then copy the themes.xml file to your project from the source where you copied the layout xml file. (OR)
  3. If the theme is sdk avail theme, if you are required it , then change your target according to your selected theme.

Hope,This might be helpful for somebody.

这篇关于无法找到风格'mapViewStyle“在当前主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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