gpt4 book ai didi

android - 加载布局时出现异常 : java. util.LinkedHashMap.eldest()Ljava/util/Map$Entry;

转载 作者:IT老高 更新时间:2023-10-28 21:48:04 25 4
gpt4 key购买 nike

尝试在图形编辑 View 中加载特定布局文件时出现以下异常。这在我下载了最新的 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)

更新:

我的工作是在设计模式下切换到 api 级别 15(有一个带有 android 图标和 api 级别的小下拉菜单)。然后我没有看到这个异常。

最佳答案

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

按照此处的说明进行操作:Android Ice Cream Sandwich Edittext: Disabling Spell Check and Word Wrap我加了

    android:inputType="textNoSuggestions"

这解决了我的问题。

关于android - 加载布局时出现异常 : java. util.LinkedHashMap.eldest()Ljava/util/Map$Entry;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11275754/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com