插件:com.android.ide.eclipse.adt错误

时间:2015-06-10 12:15:59

标签: java android eclipse layout

当我尝试添加切换按钮时出现错误,请您帮我一下吗? 我添加了一个text.xml作为布局,我正在填充它。

Included the image in question

,描述是:

java.lang.ArrayIndexOutOfBoundsException: -1
    at android.view.ShadowPainter.createDropShadow(ShadowPainter.java:116)
    at android.view.ShadowPainter.createDropShadow(ShadowPainter.java:48)
    at android.view.ViewGroup_Delegate.getPathShadow(ViewGroup_Delegate.java:140)
    at android.view.ViewGroup_Delegate.drawShadow(ViewGroup_Delegate.java:77)
    at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15017)
    at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3404)
    at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15017)
    at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3404)
    at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15117)
    at android.view.View.draw(View.java:15022)
    at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3404)
    at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15117)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:587)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:334)
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:349)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:519)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1584)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1309)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.onXmlModelChanged(GraphicalEditorPart.java:1267)
    at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegateXmlModelChanged(LayoutEditorDelegate.java:402)
    at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.xmlModelChanged(CommonXmlEditor.java:329)
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor$XmlModelStateListener.modelChanged(AndroidXmlEditor.java:1653)
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.wrapEditXmlModel(AndroidXmlEditor.java:1114)
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.wrapUndoEditXmlModel(AndroidXmlEditor.java:1190)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.MoveGesture.drop(MoveGesture.java:396)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GestureManager$CanvasDropListener.drop(GestureManager.java:679)
    at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:91)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:782)
    at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:456)
    at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:258)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
    at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
    at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:363)
    at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:289)
    at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:172)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

1 个答案:

答案 0 :(得分:0)

在图形布局中,我的原始屏幕是Nexus One,当我将屏幕更改为xhdpi屏幕时,无论哪一个,错误都消失了。然后我再次尝试将它改回Nexus,这是一个hdpi,所有错误都消失了。我仍然不明白错误的原因,但我想在xhdpi中安排Toggle Button导致问题,然后在更大的屏幕上设置它的位置,屏幕之间的对话是可能的。我不知道我只是在猜测。 :)