首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Eclipse中的主题预览失败

Eclipse中的主题预览失败
EN

Stack Overflow用户
提问于 2012-04-24 23:32:56
回答 4查看 35.5K关注 0票数 28

我已经创建了一个简单的用户名/密码对话框,我想在其中应用一个主题(它基本上定义了windowBackground),并且还想在Eclipse中预览。

我看到我的主题与主题组合框中的其他主题一起显示,但选择它会产生以下错误:

代码语言:javascript
复制
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 'textViewStyle' in current theme
android.content.res.Resources$NotFoundException
Couldn't find theme resource attr/textAppearanceLarge for the current theme
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- TextView (Change to android.widget.TextView, Fix Build Path, Edit XML)

主题定义:

代码语言:javascript
复制
<style name="my_theme">
    <item name="android:windowBackground">@drawable/form_header</item>
    <!-- <item name="android:padding">0dp</item>-->
    <item name="android:windowNoTitle">true</item>
</style>

调试工作正常。然而,WYSIWYG会更有价值。

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2012-04-24 23:37:27

在编辑器first Eclipse中关闭布局文件并重新启动

票数 45
EN

Stack Overflow用户

发布于 2013-04-23 11:44:47

我也遇到了这个问题。我通过改变主题解决了这个问题。执行此操作的步骤

在"Graphic Layout“项目中打开

  1. 活动
  2. 单击下拉列表项目(在活动"Graphic Layout")
  3. Select

AppTheme Themes->AppBaseTheme”的顶部栏上

票数 24
EN

Stack Overflow用户

发布于 2012-08-30 13:01:11

您应该在图形布局中选择另一个主题(例如:默认主题)。我认为您的自定义主题不支持某些属性。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10301171

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档