title: Could not open the editor: An unexpected exception was thrown in Eclipse Android
body: <p>I am getting error when I am trying to open xml files in <strong>res/layout/</strong> folder in Eclipse.</p>
  
  <p>I am getting the following error</p>
  
  <pre><code>java.lang.NullPointerException
  at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.syncRenderState(ConfigurationComposite.java:2428)
  at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:934)
  at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegatePageChange(LayoutEditorDelegate.java:450)
  at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.pageChange(CommonXmlEditor.java:358)
  at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
  at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
  at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
  at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
  at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
  at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
  at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
  at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
  at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
  at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
  at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
  at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
  at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
  at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
  at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
  at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
  at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
  at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
  at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
  at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
  at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
  at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
  at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
  at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
  at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
  </code></pre>
  
  <p>when I am trying to open xml file by <strong>Android Common xml Layout</strong> I am getting this error.
  can any body help me..... Thanks in advance</p>