错误,同时打开了Eclipse的Andr​​oid布局编辑器编辑器、布局、错误、打开了

2023-09-05 11:23:07 作者:旧巷少女〆

从昨天开始,每次我在Eclipse中打开我的布局编辑器为Android用户界面我得到以下异常:

Since yesterday everytime I open my layout Editor in Eclipse for the Android UI I get the following exception:

未处理的事件循环异常

    java.lang.StackOverflowError
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.isTheme(Unknown Source)
    at 
    com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.isTheme(Unknown Source)
    at... 

最后一部分推移和如果异常#1出现预期。

the last part goes on and on as expected if an Stackoverflow Exception occurs.

别人遇到这一点,并找到了解决办法? 我正在使用Mac OS X上的latests Android SDK中使用Eclipse 3.5.2

Anybody else experiencing this and found a solution? I'm working with the latests android sdk on Mac OS X with Eclipse 3.5.2

我刚安装了Eclipse的低碳版,我甚至在eclipse这个全新副本得到这个错误。

I just installed the Carbon Version of eclipse and I get this error even in this fresh copy of eclipse.

很奇怪,我是唯一一个遇到此错误。也许这不是一个Eclipse的问题,但我的项目设置的问题...

Very strange that I'm the only one experiencing this error. Maybe it is not an Eclipse problem but an problem of my project setup...

推荐答案

同样的事情发生在我身上,我只好掏了很多之前,我找到了解决办法。在我的styles.xml我有一个条目,其中名字和父属性是相同的:

The same thing happened to me, and I had to dig a lot before I found a solution. In my styles.xml I had an entry where the name and parent attributes were identical:

<style name="MyHeader" parent="MyHeader">
    <item name="android:background">@drawable/header_background</item>
</style>

通过移除父属性的布局编辑器终于再次合作:

By removing the parent attribute the layout editor finally worked again:

<style name="MyHeader">
    <item name="android:background">@drawable/header_background</item>
</style>