加载布局exception:java.util.LinkedHashMap.eldest()Ljava / util / Map $ Entry;

尝试在graphics编辑视图中加载特定的布局文件时出现以下exception。 在我下载了最新的ADT (Version 20)SDK API Level 16

 java.lang.NoSuchMethodError: java.util.LinkedHashMap.eldest()Ljava/util/Map$Entry; at android.util.LruCache.trimToSize(LruCache.java:206) at android.util.LruCache.evictAll(LruCache.java:306) at android.widget.SpellChecker.resetSession(SpellChecker.java:141) at android.widget.SpellChecker.setLocale(SpellChecker.java:147) at android.widget.SpellChecker.<init>(SpellChecker.java:112) at android.widget.Editor.updateSpellCheckSpans(Editor.java:461) at android.widget.Editor.onAttachedToWindow(Editor.java:212) at android.widget.TextView.onAttachedToWindow(TextView.java:4455) at android.widget.AutoCompleteTextView.onAttachedToWindow(AutoCompleteTextView.java:1001) at android.view.View.dispatchAttachedToWindow(View.java:11755) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424) at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:37) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:329) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:331) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325) at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:372) at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1640) at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1391) at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart$ConfigListener.onThemeChange(GraphicalEditorPart.java:735) at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onThemeChange(ConfigurationComposite.java:2901) at com.android.ide.eclipse.adt.internal.editors.layout.configuration.SelectThemeAction.run(SelectThemeAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613) 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(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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) 

更新:

我的工作是在devise模式下切换到api级别15(在android图标和api级别下有一点点下拉)。 然后我没有看到这个例外。

我遇到了同样的问题(这里对于Android来说很新,所以请耐心等待)。 我在StackTrace看到它说错误来自… SpellChecker。 所以我想也许如果我禁用拼写检查在我的编辑领域,我可以解决这个错误,直到更新到eclipse工具。

按照这里的说明: Android冰淇淋三明治Edittext:禁用拼写检查和Word Wrap我补充说

  android:inputType="textNoSuggestions" 

这解决了我的问题。