Android地图:未能找到样式';mapViewStyle';当前主题

Android地图:未能找到样式';mapViewStyle';当前主题,android,xml,google-maps,Android,Xml,Google Maps,我试图在我的应用程序中使用地图,但我遇到了这个错误, 在当前主题中找不到样式“mapViewStyle” 我已经正确地生成了密钥,并在其他地方尝试了针对同一问题提供的所有解决方案 1.my target api and the one mentioned in the manifest file are the same. 2.There is no import.R in my project 3.I have cleaned my project. 4.Uses-library elemen

我试图在我的应用程序中使用地图,但我遇到了这个错误, 在当前主题中找不到样式“mapViewStyle”

我已经正确地生成了密钥,并在其他地方尝试了针对同一问题提供的所有解决方案

1.my target api and the one mentioned in the manifest file are the same.
2.There is no import.R in my project
3.I have cleaned my project.
4.Uses-library element is a child of the application.
这是我的xml文件

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <com.google.android.maps.MapView
        android:id="@+id/mapview1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:apiKey="*****************" 
        android:enabled="true"
        />

</LinearLayout>
请帮帮我。。。
谢谢。

我的答案可能晚了,但我希望它能解决实际原因,并确保它能对那些将来要研究相同问题的人有所帮助

这类错误,

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 
上面列出的任何东西都可能是

最终原因是,

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

这可能是由于以下原因造成的:

  • 所选的
    主题
    themes.xml
    文件中不可用
  • 所选的
    主题
    属于更高版本的
    sdk
    ,但我们当前的目标
    sdk
    是较低的
  • 这个问题大部分是发生的,

  • 复制整个
    布局
    文件并尝试在
    项目中实现它时。
    A.您可能忘记复制
    themes.xml
    文件 B您可以使用较低的
    目标sdk
    ,即使用较高的
    目标sdk
    创建的原始
    布局
  • 解决这个问题的办法是,

    打开
    图形布局视图中的
    布局
    文件,然后查看右上角。
    您的
    布局的
    主题
    已被选中。)

  • 因此,单击
    主题
    选择的下拉列表,并根据您的项目
    主题
    目标sdk主题
    选择可用的
    主题。
    (或)
  • 如果
    主题
    是一个
    自定义
    主题,如果需要,请将
    themes.xml
    文件从复制
    布局xml
    文件的源复制到项目中。 (或)
  • 如果
    主题
    sdk
    avail
    主题
    ,如果需要,则根据您选择的
    主题
    更改您的
    目标

  • 希望-这可能对某些人有所帮助。

    我想我应该补充一下这一点。我在上面得到了错误4。我花了很长时间才意识到,我为我的
    首选项所做的主题会自动应用到我已经制作的每个布局文件中。如上所述选择一个不同的解决了我的问题。我不知道为什么Android Studio会自动将它应用到我所有的其他布局中,但我希望它不会


    我仍然不知道为什么我制作的主题打破了一切,因为它只是在我的
    首选项
    页面上应用背景色,但希望有一天我会这样做。

    重复?我同意dmon的观点,查看他/她引用的问题并查看文档
    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