0

每当我尝试在 findViewById() 上使用内容辅助时,代码都不会完成。它只是保持原样。当我查看错误日志时,它显示:

Unhandled event loop exception

java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:533)
    at java.lang.StringBuffer.append(StringBuffer.java:323)
    at org.eclipse.jdt.internal.core.util.MementoTokenizer.nextToken(MementoTokenizer.java:112)
    at org.eclipse.jdt.internal.core.JavaModel.getHandleFromMemento(JavaModel.java:165)
    at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento(JavaElement.java:276)
    at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:2928)
    at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:2903)
    at org.eclipse.jdt.internal.core.util.Util.getPackageFragment(Util.java:946)
    at org.eclipse.jdt.internal.core.util.Util.getClassFile(Util.java:759)
    at org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(Util.java:1526)
    at org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(Util.java:1371)
    at org.eclipse.jdt.core.dom.MethodBinding.getUnresolvedJavaElement(MethodBinding.java:254)
    at org.eclipse.jdt.core.dom.MethodBinding.getJavaElement(MethodBinding.java:240)
    at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.suggestArgumentNames(StubUtility.java:1254)
    at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createParameters(StubUtility2.java:485)
    at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createImplementationStub(StubUtility2.java:416)
    at org.eclipse.jdt.internal.ui.text.java.OverrideCompletionProposal.updateReplacementString(OverrideCompletionProposal.java:158)
    at org.eclipse.jdt.internal.ui.text.java.JavaTypeCompletionProposal.apply(JavaTypeCompletionProposal.java:107)
    at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.apply(AbstractJavaCompletionProposal.java:477)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:940)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:891)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1323)
    at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:808)
    at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:491)
    at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:65)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1285)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
    at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5932)
    at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5629)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1285)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1312)
    at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:748)
    at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3050)
    at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:741)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1773)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:5116)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4377)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8317)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1193)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2342)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3184)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

我在 Eclipse-Juno 上。我有时使用 View.onClickListener 内容辅助会收到此错误。但错误发生的频率较低。错误日志还显示,负责的插件是org.eclipse.ui。但是,我在 eclipse/plugin 文件夹中没有看到该插件。我只看到 org.eclipse.ui.intro.universal_3.2.600.v20120912-155524

此外,在对 View.onClickListener 内部类型使用内容辅助时,我还得到了“未处理的事件循环异常”。

我发现了一个类似的问题。它被报告为eclipse中的一个错误。链接在这里:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=207496

4

1 回答 1

0

我得到了它!我将 eclipse 文件夹移动到另一个位置(我的桌面)和 BOOM!没有更多的错误!我设法使用内容辅助而没有返回“未处理的事件循环异常”。也许该位置挤满了太多文件。

于 2013-05-17T14:30:05.277 回答