本文介绍了在Eclipse主题preVIEW失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要我想申请一个主题(这基本上定义 windowBackground ),这是我做了一个简单的用户名/密码对话框,然后还要到preVIEW在的Eclipse

I have made a simple username/password dialog to which I want to apply a theme (it basically defines windowBackground) and would also like to preview in Eclipse.

我看到我的主题是沿着其他主题的主题组合框中显示,但选择它产生以下错误:

I see that my theme is displayed along other themes in the Theme combo box, but selecting it produces the following error:

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)

主题定义:

<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>

调试工作正常。然而所见即所得会比较AP preciable。

Debugging works fine. However WYSIWYG would be more appreciable.

推荐答案

关闭布局文件,在编辑器中的首先,然后重新启动您的Eclipse。

Close your layout files in the editor first and restart your Eclipse.

这篇关于在Eclipse主题preVIEW失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 12:19