【问题标题】:ActionBarSherlock + Google Maps API, Failed to find style 'mapViewStyle' in current themeActionBarSherlock + Google Maps API,在当前主题中找不到样式“mapViewStyle”
【发布时间】:2012-10-23 18:44:01
【问题描述】:

首先,我知道有成千上万的帖子问同样的问题,但几天后寻找有效答案并尝试一切我仍然遇到同样的问题......

所以让我们暴露我的情况:

我使用的是 ABS + google maps,所以我的地图视图 xml 如下:

<?xml version="1.0" encoding="utf-8"?>
<com.actionbarsherlock.internal.view.menu.ActionMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ViewContainer"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >


    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:apiKey="0PGmnrCR70lothfjc_sFGTdFtESQPOksYKQWYpw"    
        android:clickable="true" />


</com.actionbarsherlock.internal.view.menu.ActionMenuItemView>

几天前一切都很好,我能够在应用程序中做我的事情和一切。但是突然间我只是做了一点改动,插入了一个framelayout来在屏幕上显示更多的选项。我试图回去,但不可能......

我真的失恋了,我该怎么办?也许我可以创建一个新项目并粘贴我的所有代码,但不确定它是否会工作......

有什么建议吗?

顺便说一句,我的错误代码是这个

Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.

Failed to find style 'mapViewStyle' in current theme
java.lang.NullPointerException
Exception details are logged in Window > Show View > Error Log

感谢您的宝贵时间!

【问题讨论】:

  • 为什么要明确使用内部类 ActionMenuItemView?
  • 现在不确定为什么,但我想我遵循了一些教程或一些示例,你推荐什么?更改还是删除?

标签: android google-maps styles actionbarsherlock


【解决方案1】:

我终于解决了问题,屏幕上的错误仍然存​​在,但就像警告一样,当我执行应用程序时同样可以正常工作。

我唯一的想法是改变ABS的具体布局并放一个框架布局。

【讨论】:

    猜你喜欢
    • 2011-10-21
    • 2011-11-14
    • 2012-01-20
    • 2012-03-16
    • 2012-05-25
    • 1970-01-01
    • 2018-12-05
    • 2018-08-23
    • 1970-01-01
    相关资源
    最近更新 更多