2013-10-27 49 views
12

我正在運行Windows 8並使用Eclipse Kepler Release創建Android應用程序。org.eclipse.swt.SWTException:試圖打開AndroidManifest.xml時出現「Widget」

當我點擊我的項目中AndroidManifest.xml文件,我收到這顯示了以下錯誤消息的警告:

Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt". 

異常堆棧跟蹤:

org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: Widget is disposed 
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) 
at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:88) 
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107) 
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:328) 
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:342) 
at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:625) 
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$2.run(ShellActivationListener.java:120) 
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.activate(ShellActivationListener.java:117) 
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:73) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066) 
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1667) 
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2151) 
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4608) 
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340) 
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627) 
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075) 
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977) 
at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method) 
at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:231) 
at org.eclipse.swt.widgets.Shell.open(Shell.java:1217) 
at org.eclipse.jface.window.Window.open(Window.java:798) 
at org.eclipse.ui.internal.statushandlers.InternalDialog.open(InternalDialog.java:327) 
at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:270) 
at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:197) 
at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:156) 
at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:101) 
at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.handle(WorkbenchErrorHandler.java:57) 
at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handle(IDEWorkbenchErrorHandler.java:108) 
at org.eclipse.ui.internal.WorkbenchErrorHandlerProxy.handle(WorkbenchErrorHandlerProxy.java:36) 
at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:189) 
at org.eclipse.ui.internal.JFaceUtil$3.show(JFaceUtil.java:70) 
at org.eclipse.jface.util.SafeRunnable.handleException(SafeRunnable.java:67) 
at org.eclipse.core.runtime.SafeRunner.handleException(SafeRunner.java:75) 
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:44) 
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:1057) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) 
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) 
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) 
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) 
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 
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:354) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) 
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:636) 
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1450) 
Caused by: org.eclipse.swt.SWTException: Widget is disposed 
at org.eclipse.swt.SWT.error(SWT.java:4397) 
at org.eclipse.swt.SWT.error(SWT.java:4312) 
at org.eclipse.swt.SWT.error(SWT.java:4283) 
at org.eclipse.swt.widgets.Widget.error(Widget.java:472) 
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:344) 
at org.eclipse.swt.widgets.Widget.addDisposeListener(Widget.java:214) 
at org.eclipse.e4.ui.css.swt.engine.CSSSWTEngineImpl.hookNativeWidget(CSSSWTEngineImpl.java:52) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.getElement(AbstractCSSEngine.java:919) 
at org.eclipse.e4.ui.css.core.dom.ElementAdapter.getElement(ElementAdapter.java:336) 
at org.eclipse.e4.ui.css.swt.dom.CTabFolderElement.item(CTabFolderElement.java:52) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:481) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:405) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:481) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:405) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:481) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:405) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:481) 
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:405) 
at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.applyStyles(ThemeEngine.java:497) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$10.setClassnameAndId(PartRenderingEngine.java:1267) 
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.setCSSInfo(SWTPartRenderer.java:92) 
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.styleStack(WBWRenderer.java:179) 
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.trackActivePart(WBWRenderer.java:148) 
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) 
... 71 more 
+0

關閉和打開Eclipse IDE解決了這個問題。我正在將.java和.xml文件從一個項目複製並粘貼到另一個項目。我仍然不知道是什麼原因造成的。 –

+0

同樣的問題,相同的解決方法。 使用: - Android開發者工具 - Build:v22.6.2-1085508 – porfiriopartida

回答

34

重新啓動Eclipse的IDE解決了這個問題。

+0

重新啓動工作。我試圖按照http://developer.android.com/google/play-services/setup.html上的說明爲gcm目的導入「google-play-services_lib」並面臨此錯誤。觀察到重新啓動'project.properties'文件中的值後自動更改。 – simpleDev

4

通過命令提示符通過輸入命令啓動Eclipse:eclipse -clean解決了我的問題。

+11

只有eclipse -clean -clearPersistedState爲我工作;) – Camilla

+0

在哪裏給這個命令,意味着從哪個位置? –

+0

文件清理無法找到,我得到 – abh22ishek

3

關閉Eclipse並重新啓動Eclipse而不是重新啓動Eclipse會更好,它的運行速度會更快。

+7

有什麼區別? – James

9

日食 - 開普勒/盧納/火星

我,我去

... \ metadata.plugins \ org.eclipse.e4.workbench //文件夾locaiton。

和刪除的

workbench.xmi

所有內容並重新啓動應用程序。

爲我工作希望能爲你工作。

注意:在進行更改之前請妥善保管。

相關問題