I'm struggling with this strange bug with ADT on Eclipse (version 22.6.3): after few lucky runs, when I try to open an XML file it shows an empty and non-editable blank file. I've already tried EVERYTHING, from resetting/reinstalling all the plugins to using a fresh installed Eclipse on a fresh new workspace, the problem persists.
This is the error from the eclipse log:
Caused by: java.lang.NoSuchFieldError: ACTION_BAR
at com.android.layoutlib.bridge.Bridge.init(Bridge.java:206)
at com.android.ide.common.rendering.LayoutLibrary.init(LayoutLibrary.java:297)
at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:327)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.updateCapabilities(GraphicalEditorPart.java:1202)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.onTargetChange(GraphicalEditorPart.java:1194)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.onDescriptorsChanged(LayoutEditorDelegate.java:916)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegateInitUiRootNode(LayoutEditorDelegate.java:835)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegateXmlModelChanged(LayoutEditorDelegate.java:393)
at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.xmlModelChanged(CommonXmlEditor.java:329)
at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor$XmlModelStateListener.modelChanged(AndroidXmlEditor.java:1653)
at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.createTextEditor(AndroidXmlEditor.java:835)
at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.createAndroidPages(AndroidXmlEditor.java:320)
at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.addPages(AndroidXmlEditor.java:310)
at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.addPages(CommonXmlEditor.java:285)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 83 more
I'm the only one with this problem? Any suggestion is appreciated ;)
Try to change the target api of your project. Set it to below than Api level 19 and also change the api from bar displaying above layout(Graphically).
And also change the theme of your project in styles.xml to android:Theme.Holo.Light, if you have any other theme mentioned in in style.xml
Hope it helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With